A partir do tail
página de manual :
The tail utility displays the contents of file or, by default, its standard input, to the standard output.
The display begins at a byte, line or 512-byte block location in the input. Numbers having a leading plus ("+") sign are relative to the beginning of the input, for example, "-c +2" starts the display at the second byte of the input. Numbers having a leading minus ("-") sign or no explicit sign are relative to the end of the input, for example, "-n 2" displays the last two lines of the input. The default starting location is "-n 10", or the last 10 lines of the input.
Portanto, no seu caso, tail +3
(o -n
está implícito) significa iniciar na terceira linha da entrada ( ls -l
) e imprimir o restante. Por exemplo:
ls -l
output:
total 0
-rw-r--r-- 1 carl staff 0 Oct 28 13:18 file1
-rw-r--r-- 1 carl staff 0 Oct 28 13:18 file2
-rw-r--r-- 1 carl staff 0 Oct 28 13:18 file3
-rw-r--r-- 1 carl staff 0 Oct 28 13:18 file4
-rw-r--r-- 1 carl staff 0 Oct 28 13:18 file5
-rw-r--r-- 1 carl staff 0 Oct 28 13:18 file6
ls -l | tail +3
output:
-rw-r--r-- 1 carl staff 0 Oct 28 13:18 file2
-rw-r--r-- 1 carl staff 0 Oct 28 13:18 file3
-rw-r--r-- 1 carl staff 0 Oct 28 13:18 file4
-rw-r--r-- 1 carl staff 0 Oct 28 13:18 file5
-rw-r--r-- 1 carl staff 0 Oct 28 13:18 file6
Mesma saída, apenas com as primeiras linhas removidas.