'head'- print the beginning of files - Video Man Pages

'head'- print the beginning of files - Video Man Pages

D
DistroTube
9 Video Views·Mar 16, 2026

The 'head' command is used to print the beginning lines of a file.

- Print first 10 lines in a file:
head path/to/file

- Print first 10 lines of multiple files:
head path/to/file1 path/to/file2 ...

- Print the first 5 lines (-n 5) of a file:
head -n 5 path/to/file

- Print everything but the last 5 lines (-n -5) of a file:
head -n -5 path/to/file

- Print the first 12 bytes (-c) of a file:
head -c 12 path/to/file

- Print everything but the last few bytes of a file:
head -c -12 path/to/file

- Use verbose mode (-v) to print headers giving file names:
head -v file1
NOTE When running 'head' 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 'head' 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