TAIL(1)

✨ TAIL(1) β€” the tail girlie ✨

okay so bestie, we're in the General Commands Manual section and today's main character is tail πŸ’… she shows you the end of things. iconic behaviour honestly.


πŸŽ€ NAME πŸŽ€

tail β€” Print the last 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input.

also real quick, mandatory arguments to long options are mandatory for short options too. no cap. 🫢


🌸 SYNOPSIS 🌸

tail [OPTION]... [FILE]...

πŸ¦‹ DESCRIPTION πŸ¦‹

Print the last 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input.

and like, repeat after me: mandatory arguments to long options are mandatory for short options too ✨ that's the whole vibe.


πŸ‘‘ OPTIONS πŸ‘‘

  • -c, --bytes β€” Number of bytes to print
  • -f, --follow β€” Print the file as it grows Possible values:
    • descriptor
    • name
  • -n, --lines β€” Number of lines to print
  • --pid <PID> β€” With -f, terminate after process ID, PID dies
  • -q, --quiet β€” Never output headers giving file names
  • -s, --sleep-interval <N> β€” Number of seconds to sleep between polling the file when running with -f
  • --max-unchanged-stats <N> β€” Reopen a FILE which has not changed size after N (default 5) iterations to see if it has been unlinked or renamed (this is the usual case of rotated log files); This option is meaningful only when polling (i.e., with --use-polling) and when --follow=name
  • -v, --verbose β€” Always output headers giving file names
  • -z, --zero-terminated β€” Line delimiter is NUL, not newline
  • --use-polling β€” Disable 'inotify' support and use polling instead
  • --retry β€” Keep trying to open a file if it is inaccessible
  • -F β€” Same as --follow=name --retry
  • --debug β€” indicate which --follow implementation is used
  • -h, --help β€” Print help
  • -V, --version β€” Print version
  • [files] β€” the files, bestie πŸ“

πŸ’œ VERSION πŸ’œ

v(uutils coreutils) 0.12.0

🌈 EXAMPLES 🌈

Show last 10 lines in a file:

tail path/to/file

Show last 10 lines of multiple files:

tail path/to/file1 path/to/file2 ...

Show last 5 lines in file:

tail [-5|--lines 5] path/to/file

Print a file from a specific line number:

tail [-n|--lines] +count path/to/file

Print a specific count of bytes from the end of a given file:

tail [-c|--bytes] count path/to/file

Print the last lines of a given file and keep reading it until <Ctrl c>:

tail [-f|--follow] path/to/file

Keep reading file until <Ctrl c>, even if the file is inaccessible:

tail [-F|--retry --follow] path/to/file

Show last count lines in a file and refresh every seconds seconds:

tail [-n|--lines] count [-s|--sleep-interval] seconds [-f|--follow]
path/to/file
The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail. 😭 fr fr, be gentle with her.

and that's the whole thing bestie πŸ’– this page is from the uutils coreutils, v(uutils coreutils) 0.12.0, dated 2026-09-25 β€” go forth and tail ur logs, mwah πŸ§šβœ¨πŸ‘‘

πŸ“¦ where this page comes from