Remove the first line from file / Remove first N lines from file

tail -n +2 someFile

*Notes: You MUST include the + sign or else the last 2 lines will be printed instead.


To remove N lines from the start of the file

tail -n +$M someFile

*NOTES: M = N + 1
You MUST include the + sign in-front of the number M or else the output will be the last M lines instead.

This post is also available in: Greek

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.