Alex Rivera | Logout

How to get the last lines of a file except the first 20?

Asked 2008-11-24T14:46:17.487
14

Say I have a file with any number of lines, say, 125. I want to get all the lines except the first n, say, 20. So, I want lines 21–125.

Is there a way to do this with with tail/head, or some other tool?

Edit
Report

1 Answer

34

Try

tail -n +21 myfile.txt
answered 2008-11-24T14:50:03.843

Your Answer