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 [OPCIÓN]... [ARCHIVO]...

Mostrar las primeras 10 líneas de cada ARCHIVO a salida estándar. Con más de un ARCHIVO, preceder cada uno con un encabezado que muestre el nombre del archivo. Sin ARCHIVO, o cuando ARCHIVO es -, leer entrada estándar.

Los argumentos obligatorios para las opciones largas también son obligatorios para las opciones cortas.

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

Muestra las primeras líneas de un archivo:

head {{[-n|--lines]}} {{cuenta}} {{ruta/al/archivo}}

Muestra los primeros bits de un archivo:

head {{[-c|--bytes]}} {{cuenta}} {{ruta/al/archivo}}

Muestra todo el contenido de un archivo excepto las últimas líneas:

head {{[-n|--lines]}} -{{cuenta}} {{ruta/al/archivo}}

Muestra todo el contenido de un archivo excepto los últimos bits:

head {{[-c|--bytes]}} -{{cuenta}} {{ruta/al/archivo}}

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.