Tail

Tail

tail

tail (que significa cola en inglés) es un programa de los sistemas tipo Unix, que muestra las últimas líneas de uno o más archivos de texto.

tail imprimirá por defecto a la salida estándar las últimas diez líneas de sus datos de entrada. Tanto las unidades de impresión (líneas, bloques, bytes) como su número pueden alterarse con opciones de la línea de comandos:

  • -n número: imprime el número indicado de líneas.
  • -c número: imprime el número indicado de bytes.

Si el número indicado en las opciones va precedido por un signo +, tail imprimirá desde la enésima unidad hasta el final del archivo. Por ejemplo, el comando

tail -c +175 archivo

imprimirá el contenido de archivo comenzando en el byte 175.

Usando una sintaxis más vieja (que aún se usa en Sun Solaris en lugar de la opción -n), las últimas 20 líneas y los últimos 20 bytes de archivo se mostrarían, respectivamente, con los comandos:

tail -20 archivo
tail -20c archivo

Esta sintaxis, sin embargo, se considera obsoleta y no sigue el estándar POSIX 1003.1-2001. Aun si las versiones actuales la admiten, podría no funcionar cuando se usa con otras opciones (como -f, véase la siguiente sección).

Seguimiento de archivos

tail tiene una opción especial, -f (del inglés follow, seguir), que permite hacer seguimiento a un archivo. En lugar de mostrar las últimas líneas y terminar, tail mostrará las últimas líneas y seguirá leyendo del archivo; conforme se le añadan nuevas líneas, tail las imprimirá. Esta función es particularmente útil para archivos de registro.

Para cerrar tail cuando esté haciendo seguimiento, basta interrumpirlo con Ctrl+C.

Véase también

Enlaces externos

Obtenido de "Tail"

Wikimedia foundation. 2010.

Игры ⚽ Поможем написать курсовую

Mira otros diccionarios:

  • Tail — Tail, n. [AS. t[ae]gel, t[ae]gl; akin to G. zagel, Icel. tagl, Sw. tagel, Goth. tagl hair. [root]59.] 1. (Zo[ o]l.) The terminal, and usually flexible, posterior appendage of an animal. [1913 Webster] Note: The tail of mammals and reptiles… …   The Collaborative International Dictionary of English

  • tail — (que significa cola en inglés) es un programa de los sistemas tipo Unix, que muestra las últimas líneas de uno o más archivos de texto. tail imprimirá por defecto a la salida estándar las últimas diez líneas de sus datos de entrada. Tanto las… …   Wikipedia Español

  • tail — 1 n [Anglo French, literally, cutting, from Old French, from taillier to cut, prune] 1: the condition of being limited or restricted by entailing a tenant in tail 2: entail (2) tail 2 adj: limited as to tenure see al …   Law dictionary

  • tail — tail1 [tāl] n. [ME < OE tægel, akin to OHG zagel < IE base * dek̑ , to tear, tear off > Sans saśā, fringe] 1. a) the rear end of an animal s body, esp. when forming a distinct, flexible appendage to the trunk b) such an appendage 2.… …   English World dictionary

  • tail — ► NOUN 1) the hindmost part of an animal, especially when extended beyond the rest of the body. 2) something extending downwards, outwards, or back like an animal s tail. 3) the rear part of an aircraft, with the tailplane and rudder. 4) the… …   English terms dictionary

  • Tail — утилита в UNIX, выводящая несколько (по умолчанию 10) последних строк из файла. Синтаксис tail [параметры] имя файла Ключ n <количество строк> (или просто <количество строк>) позволяет изменить количество выводимых строк: tail 20… …   Википедия

  • tail — tail  утилита в UNIX, выводящая несколько (по умолчанию 10) последних строк из файла. Синтаксис tail [параметры] имя файла Ключ n <количество строк> (или просто <количество строк>) позволяет изменить количество выводимых строк:… …   Википедия

  • Tail — Tail, v. t. 1. To follow or hang to, like a tail; to be attached closely to, as that which can not be evaded. [Obs.] [1913 Webster] Nevertheless his bond of two thousand pounds, wherewith he was tailed, continued uncanceled, and was called on the …   The Collaborative International Dictionary of English

  • Tail — Tail, n. [F. taille a cutting. See {Entail}, {Tally}.] (Law) Limitation; abridgment. Burrill. [1913 Webster] {Estate in tail}, a limited, abridged, or reduced fee; an estate limited to certain heirs, and from which the other heirs are precluded;… …   The Collaborative International Dictionary of English

  • Tail — Tail, a. (Law) Limited; abridged; reduced; curtailed; as, estate tail. [1913 Webster] …   The Collaborative International Dictionary of English

Compartir el artículo y extractos

Link directo
Do a right-click on the link above
and select “Copy Link”