How to tail all lines except first row [duplicate]
For example, I have a file
1
2
3
then I want to output from 2nd row to tail
How can I do it in linux
tail -n+2 my_file
will output all the lines in myfile
starting with line 2. (-n2
would show you the last two lines.)
tail
has lots more options. Type man tail
for complete documentation.
shorter with
$ sed 1d filename
or with awk
$ awk 'NR>1' filename