2017-08-06 47 views
-1

我正在尋找下面的命令的等效命令,該命令適用於AIX和Linux計算機,但不適用於Sun Solaris計算機。基本上,它是拖尾的文件,並只獲得該文件的最後10個字符:用於加載文件上字符數量的Solaris等效項

尾-c -10 FILENAME.TXT

任何想法?

+0

的可能的複製[什麼是在Solaris相當於BSD的 '尾巴-n100'?](https://開頭計算器.com/questions/314321/whats-the-solaris-equivalent-to-the-bsds-tail-n100) – DirkyJerky

+0

那是不一樣的 –

+0

它們是數線,因爲我需要數字字符 –

回答

1

按照tail manual page,該XPG4變種會做什麼有人問:

 
    /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. 
+0

謝謝!它工作時,我用完整的路徑,而不是隻使用尾巴 –