tail

最後更新: 2021-03-08

 


Opts

 

-f, --follow=Name

output appended data as the file grows

-F

相當於 "-f /path/to/file --retry"

--retry    keep trying to open a file if it is inaccessible

-s, --sleep-interval=N

with -f, sleep for approximately N seconds (default 1.0) between iterations.

---

-n / -n K

Output the last n / K lines, instead of the default last 10 ( -10 / -n 10)

use "-n +K" format to output lines starting with the Kth

tail -n +1      # 由第一行開始, 亦即係全要

tail -n +2      # 由第二行開始, 亦即係略過 header (第一行)

Creative Commons license icon Creative Commons license icon