gpt4 book ai didi

linux - Solaris 等效于拖尾文件中的字符数量

转载 作者:太空宇宙 更新时间:2023-11-04 09:17:30 26 4
gpt4 key购买 nike

我正在寻找适用于 AIX 和 Linux 机器但不适用于 Sun Solaris 机器的以下命令的等效命令。基本上它是跟踪文件并只获取文件的最后 10 个字符:

tail -c -10 文件名.txt

有什么想法吗??

最佳答案

根据tail manual pagexpg4 变体将执行要求的操作:

   /usr/xpg4/bin/tail       -c number      The number option-argument must  be  a  decimal  integer              whose sign affects the location in the file, measured in              bytes, to begin the copying:              +      Copying starts relative to the beginning  of  the                     file.              -      Copying starts relative to the end of the file.              none   Copying starts relative to the end of the file.              The  origin for counting is 1; that is, -c +1 represents              the first byte of the file, -c -1 the last.

关于linux - Solaris 等效于拖尾文件中的字符数量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45537562/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com