1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-01 20:55:24 +02:00

tail: refresh page (#7681)

This commit is contained in:
Emily Grace Seville 2022-01-22 18:06:48 -08:00 committed by GitHub
parent 26adab31c6
commit 27033a5d95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,28 +1,29 @@
# tail
> Display the last part of a file.
> See also: `head`.
> More information: <https://www.gnu.org/software/coreutils/tail>.
- Show last 'num' lines in file:
- Show last 'count' lines in file:
`tail -n {{num}} {{file}}`
`tail --lines {{count}} {{path/to/file}}`
- Show all file since line 'num':
- Print a file from a specific line number:
`tail -n +{{num}} {{file}}`
`tail --lines +{{count}} {{path/to/file}}`
- Show last 'num' bytes in file:
- Print a specific count of bytes from the end of a given file:
`tail -c {{num}} {{file}}`
`tail --bytes {{count}} {{path/to/file}}`
- Keep reading file until `Ctrl + C`:
- Print the last lines of a given file and keep reading file until `Ctrl + C`:
`tail -f {{file}}`
`tail --follow {{path/to/file}}`
- Keep reading file until `Ctrl + C`, even if the file is inaccessible:
`tail -F {{file}}`
`tail --retry --follow {{path/to/file}}`
- Show last 'num' lines in 'file' and refresh every 'n' seconds:
`tail -n {{num}} -s {{n}} -f {{file}}`
`tail --lines {{count}} --sleep-interval {{seconds}} --follow {{path/to/file}}`