tail Command Examples

Display the last part of a file. See also: head. More information: https://www.gnu.org/software/coreutils/manual/html_node/tail-invocation.html.

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

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

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

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

tail --retry {{[-f|--follow]}} {{path/to/file}}

tail {{[-n|--lines]}} {{count}} {{[-s|--sleep-interval]}} {{seconds}} {{[-f|--follow]}} {{path/to/file}}