HEAD(1)
π HEAD(1) π
okay bestie, welcome to head β the Little Sister of the command line, from the GNU coreutils family, living in User Commands. she's giving main character energy and honestly? she deserves it. π
β¨ NAME β¨
head β output the first part of files. that's it. that's the whole vibe. she peeks at the top of your file and shows you what's up. π
β¨ SYNOPSIS β¨
head [OPTION]... [FILE]...
β¨ DESCRIPTION β¨
so here's the tea: head prints the first 10 lines of each FILE to standard output. ten. that's the default. no notes. β¨
if you hand her more than one FILE, she's polite about it β she'll precede each one with a header that tells you which file you're looking at. because otherwise you'd be lost and confused and we don't do that here. π«Ά
if you give her no FILE, or FILE is literally just -, she reads from standard input. slay, she's flexible. π
okay important one, don't skip this: Mandatory arguments to long options are mandatory for short options too. the long-option girlies and the short-option girlies play by the same rules. periodt. π
okay now the β¨optionsβ¨, sit down, get comfy:
-c,--bytes=[-]NUMβ print the first NUM bytes of each file. but if that NUM has a leading-in front of it? plot twist: she prints all but the last NUM bytes. iconic behaviour, truly. π-n,--lines=[-]NUMβ print the first NUM lines instead of the first 10. and yeah, same little trick: with a leading-, she prints all but the last NUM lines of each file. she contains multitudes. π¦-q,--quiet,--silentβ never print headers giving file names. she goes quiet, she minds her business, she's mysterious. π-v,--verboseβ always print headers giving file names. the opposite energy. she's telling you EVERYTHING and honestly good for her. π-z,--zero-terminatedβ the line delimiter isNUL, not newline. for when your data is built different. β--helpβ display this help and exit. she'll explain herself, love that for her.--versionβ output version information and exit. she'll tell you who she is. π
πΈ about that NUM, bestie πΈ
lowkey important, highkey useful: NUM may have a multiplier suffix. here's the full list, keep it in your notes app:
b= 512kB= 1000K= 1024MB= 1000*1000M= 1024*1024GB= 1000*1000*1000G= 1024*1024*1024- and so on for
T,P,E,Z,Y,R,Q
and yes, binary prefixes work too: KiB=K, MiB=M, and so on. so if you've ever been like "is it 1000 or is it 1024" β it's both, it depends on the letter, and now you know. iykyk. π
β¨ AUTHOR β¨
Written by David MacKenzie and Jim Meyering. absolute legends, we stan. π
β¨ REPORTING BUGS β¨
found a bug? don't suffer in silence, tell the girlies:
- Report bugs to:
bug-coreutils@gnu.org - GNU coreutils home page:
https://www.gnu.org/software/coreutils/ - General help using GNU software:
https://www.gnu.org/gethelp/ - Report any translation bugs to:
https://translationproject.org/team/
β¨ SEE ALSO β¨
tail(1)β her sister. opposite direction. equally iconic. π
full documentation lives at https://www.gnu.org/software/coreutils/head, or you can get it locally via:
info '(coreutils) head invocation'
Packaged by Ubuntu (9.10-1ubuntu2) Copyright Β© 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
okay that's the whole page bestie, you ate that π this was GNU coreutils 9.10, dated August 2026, and that's the tea β mwah, go read the top 10 lines of something. π β¨π¦
π¦ where this page comes from
- ubuntu stonking: gnu-coreutils 9.10-1ubuntu2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms