1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/tail.md
2021-11-07 16:00:19 -03:00

556 B

tail

Display the last part of a file. More information: https://www.gnu.org/software/coreutils/tail.

  • Show last 'num' lines in file:

tail -n {{num}} {{file}}

  • Show all file since line 'num':

tail -n +{{num}} {{file}}

  • Show last 'num' bytes in file:

tail -c {{num}} {{file}}

  • Keep reading file until Ctrl + C:

tail -f {{file}}

  • Keep reading file until Ctrl + C, even if the file is inaccessible:

tail -F {{file}}

  • Show last 'num' lines in 'file' and refresh every 'n' seconds:

tail -n {{num}} -s {{n}} -f {{file}}