'tail' - print the ending of files - Video Man Pages

'tail' - print the ending of files - Video Man Pages

D
DistroTube
14 Video Views·Mar 16, 2026

The 'tail' command is used to print the ending lines of a file.

- Print last 10 lines in a file:
tail path/to/file

- Print last 10 lines of multiple files:
tail path/to/file1 path/to/file2 ...

- Print last 5 lines (-n 5) in file:
tail -n 5 path/to/file

- Print a file starting from line number 5 (-n +5):
tail -n +5 path/to/file

- Print the first 12 bytes (-c 12) from the end of a given file:
tail -c 12 path/to/file

- Print the last lines of a given file and keep reading it (following it) until CTRL-C:
tail -f path/to/file
NOTE Useful if running 'tail' on a file that is being appended constantly.

- Show last 5 lines (-n 5) in a file, follow for changes (-f), and check every 5 seconds (-s 5):
tail -n 5 -s 5 -f path/to/file

- Use verbose mode (-v) to print headers giving file names:
head -v file1
NOTE When running 'tail' on multiple files, verbose is the default mode.

- Use quiet mode (-q) to suppress the printing of headers giving file names:
head -q file1 file2
NOTE When running 'tail' on a single file, quiet is the default mode.

REFERENCED:
https://gitlab.com/dwt1/vidman - Video Man Pages

WANT TO SUPPORT THE CHANNEL?
💰 Patreon: https://www.patreon.com/distrotube
💳 Paypal: https://www.paypal.com/donate/?hosted_button_id=MW3ZFGS8Q9JGW
🛍️ Amazon: https://amzn.to/2RotFFi
👕 Teespring: https://teespring.com/stores/distrotube

DT ON THE WEB:
🕸️ Website: http://distro.tube
📁 GitLab: https://gitlab.com/dwt1
🗨️ Mastodon: https://fosstodon.org/@distrotube
👫 Reddit: https://www.reddit.com/r/DistroTube/
📽️ Odysee: https://odysee.com/@DistroTube:2

FREE AND OPEN SOURCE SOFTWARE THAT I LIKE:
🌐 Brave Browser - https://brave.com/
📽️ Open Broadcaster Software: https://obsproject.com/
🎬 Kdenlive: https://kdenlive.org
🎨 GIMP: https://www.gimp.org/
💻 VirtualBox: https://www.virtualbox.org/
🗒️ Doom Emacs: https://github.com/hlissner/doom-emacs

Your support is very much appreciated. Thanks, guys!

AI GeneratedMay contain errors