PDA

View Full Version : about tail +2



jsanza@terra.es
15th September 2006, 01:27 PM
Hello,

I am confusing about using tail +<number> to exclude by example,
the <number> initial lines from a file.

I can use ls -lrt | sort |tail +3 in Aix system and the results shows me
all "ls -lrt" lines sorted without two initial lines. Ok

But, i can't use it in Fedora, it shows error , it thinks "+3" is a file !

But if i write ls -lrt | sort |tail -n+3 , it seems to do ok

why "tail" is so different ?

or, am i doing anything wrong?

thank you

markkuk
15th September 2006, 01:48 PM
In Linux, tail works as specified in the POSIX standard (http://www.opengroup.org/onlinepubs/009695399/utilities/tail.html) (with GNU extensions, see "man tail"), but AIX follows some older specification.