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

Solaris equivalent for tailing the amount of characters on a file

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

tail -c -10 filename.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.

Solaris 11.2 tail 从文件中获取最后 100 行: 尾巴 -100 filename.txt

Solaris 11.2 获取带尾巴的最后一个字符: /usr/xpg4/bin/tail-c -2saida.txt

得到最后 2 个带尾的字符: /usr/xpg4/bin/tail-c -3saida.txt