PDA

View Full Version : tail comand



vksingh
March 6th, 2010, 03:54 PM
Hi,

I tried the following command but it did not work.

tail -2 test2

Please help.

Thanks,

Vivek

vksingh
March 6th, 2010, 03:55 PM
Hi,
I tried tail command like the following:

tail +7 test.txt.

But its is printing the whole content of the file. Please help.


Thanks,

Vivek

matmatmat
March 6th, 2010, 04:02 PM
Are you trying to print out the last two lines? If so it it -n 2

MadCow108
March 6th, 2010, 04:03 PM
you still need the -n

tail -n +5 text
or
tail --lines=+5 text

Sef
March 6th, 2010, 05:26 PM
Merged duplicate threads.