我使用tail -f
來打印連續更改文件的內容。當文件被截斷它顯示是這樣的:使用`tail -f`截斷文件時清除屏幕
blah (old)..
blah more (old)..
tail: file.out: file truncated
blah..
blah more..
這會導致混亂,當我更改文件往往使其變得難以看到文件開始/結束。有沒有辦法以某種方式clear
屏幕截斷文件,以便它會顯示像這樣?
tail: file.out: file truncated
blah..
blah more..
爲什麼收票? – none