HEAD(1) | General Commands Manual | HEAD(1) |
head
— print first
part of files
head |
[-qvz ] [-c
size | -n
num |
- num]
[file...] |
head
reads each file
in sequence and writes it's first part on standard output. If no
file is given, head
reads from
the standard input.
-c
sizesize can be multiplied by one of KMGTP (Kilo, Mega, Giga, Tera, ...) using power of 1024 by default, which can be either explicit via adding iB (like MiB), or turned into powers of 1000 by adding B (like MB).
-n
num,
-
numThe -
num form is
historical, new scripts should use the standard
-n
num form.
-q
-v
-z
If no option is specified, head
defaults
to reading the first 10 lines.
The head
utility exits 0 on
success, and >0 if an error occurs.
Contains the specified part of each file,
with the following header when multiple file are
given, or when -v
is set:
"==> %s <==\n", <file>
head
should be compliant with the IEEE Std
1003.1-2024 (“POSIX.1”) specification.
The -q
, -v
, and
-z
options are extensions. The
-
num option is historical.
Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
2024-05-27 | Linux 6.6.67-gentoo-x86_64 |