Remove first line from a very large file

Reading Time: 1 minute
$ tail -n +2 very_large_export_file.csv > very_large_export_file_NEW.csv

Explanation

tail [OPTION]... [FILE]... – Print the last 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no FILE, or when FILE is -, read standard input. Arguments:

  • -n, --lines=[+]NUM – output the last NUM lines, instead of the last 10; or use -n +NUM to output starting with line NUM.

> – Send output of the left-hand command to the right-hand file. In our case the output generated by the tail command is written to a new file very_large_export_file_NEW.csv.

We transform challenges into digital experiences

Get in touch to let us know what you’re looking for. Our policy includes 14 days risk-free!

Free project consultation