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

tail

v0.13.0
tail [OPTION]... [FICHIER]...

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

Les arguments obligatoires pour les options longues sont également obligatoires pour les options courtes.

Options

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

Print the last NUM bytes; use -c +NUM to print from byte NUM onward (counting from 1)

--follow, -f

Print the file as it grows

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

Print the last NUM lines; use -n +NUM to print from line NUM onward (counting from 1)

--pid=<PID>

With -f, terminate after process ID, PID dies

--quiet, --silent, -q

Never output headers giving file names

--sleep-interval=<N>, -s <N>

Number of seconds to sleep between polling the file when running with -f

--max-unchanged-stats=<N>

Reopen a FILE which has not changed size after N (default 5) iterations to see if it has been unlinked or renamed (this is the usual case of rotated log files); This option is meaningful only when polling (i.e., with –use-polling) and when –follow=name

--verbose, -v

Always output headers giving file names

--zero-terminated, -z

Line delimiter is NUL, not newline

--use-polling

Désactiver le support ‘inotify’ et utiliser le sondage à la place

--retry

Keep trying to open a file if it is inaccessible

-F

Same as –follow=name –retry

--debug

indicate which –follow implementation is used

--presume-input-pipe

Examples

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

tail {{chemin/vers/fichier}}

Affiche les 10 dernières lignes de plusieurs fichiers :

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

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

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

Affiche tout le contenu d’un fichier à partir d’une ligne spécifique :

tail {{[-n|--lines]}} +{{ligne}} {{chemin/vers/fichier}}

Affiche un nombre spécifique d’octets à partir de la fin d’un fichier :

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

Affiche les dernières lignes d’un fichier et continuer à le lire jusqu’à ce que l’on appuie sur <Ctrl c> :

tail {{[-f|--follow]}} {{chemin/vers/fichier}}

Continue à lire le fichier jusqu’à ce que l’on appuie sur <Ctrl c>, même si le fichier est inaccessible :

tail {{[-F|--retry --follow]}} {{chemin/vers/fichier}}

Affiche les nombre dernières lignes d’un fichier et actualiser toutes les secondes secondes :

tail {{[-n|--lines]}} {{nombre}} {{[-s|--sleep-interval]}} {{secondes}} {{[-f|--follow]}} {{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.