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

29 lines
551 B
Markdown
Raw Normal View History

2014-02-22 16:49:40 -05:00
# tail
> Display the last part of a file.
> More information: <https://www.gnu.org/software/coreutils/tail>.
2014-02-22 16:49:40 -05:00
- Show last 'num' lines in file:
2014-02-22 16:49:40 -05:00
`tail -n {{num}} {{file}}`
- Show all file since line 'num':
2014-03-19 12:49:24 +01:00
`tail -n +{{num}} {{file}}`
- Show last 'num' bytes in file:
2014-02-22 16:49:40 -05:00
`tail -c {{num}} {{file}}`
- Keep reading file until `Ctrl + C`:
2014-02-22 16:49:40 -05:00
`tail -f {{file}}`
2017-11-24 11:41:53 +05:30
- Keep reading file until `Ctrl + C`, even if the file is rotated:
`tail -F {{file}}`
- Show last 'num' lines in 'file' and refresh every 'n' seconds:
`tail -n {{num}} -s {{n}} -f {{file}}`