Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

head

Some strings on this page have not been translated yet. You can help by translating them on Weblate.
v0.13.0
head [OPTION]... [FICHIER]...

Affiche les 10 premières lignes de chaque FICHIER sur la sortie standard. Avec plus d’un FICHIER, précède chacun d’un en-tête donnant le nom du fichier. Sans FICHIER, ou quand FICHIER est -, lit l’entrée standard.

Les arguments obligatoires pour les options longues sont obligatoires pour les options courtes aussi.

Options

--bytes=<[-]NUM>, -c <[-]NUM>

print the first NUM bytes of each file;
with a leading ‘-’, print all but the last
NUM bytes of each file

--lines=<[-]NUM>, -n <[-]NUM>

print the first NUM lines instead of the first 10;
with a leading ‘-’, print all but the last
NUM lines of each file

--quiet, --silent, -q

never print headers giving file names

--verbose, -v

always print headers giving file names

--presume-input-pipe
--zero-terminated, -z

line delimiter is NUL, not newline

Examples

Affiche les 10 premières lignes d’un fichier :

head {{chemin/vers/fichier}}

Affiche les 10 premières lignes de plusieurs fichiers :

head {{chemin/vers/fichier1 chemin/vers/fichier2 ...}}

Affiche les 5 premières lignes d’un fichier :

head {{[-5|--lines 5]}} {{chemin/vers/fichier}}

Affiche un nombre de lignes d’un fichier :

head {{[-n|--lines]}} {{nombre}} {{chemin/vers/fichier}}

Affiche un nombre spécifique d’octets à partir du début d’un fichier :

head {{[-c|--bytes]}} {{nombre}} {{chemin/vers/fichier}}

Affiche tout le contenu d’un fichier sauf un nombre de lignes à la fin :

head {{[-n|--lines]}} -{{nombre}} {{chemin/vers/fichier}}

Affiche tout le contenu d’un fichier sauf un nombre d’octets à la fin :

head {{[-c|--bytes]}} -{{nombre}} {{chemin/vers/fichier}}

The examples are provided by the tldr-pages project under the CC BY 4.0 License.

Please note that, as uutils is a work in progress, some examples might fail.