Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can use the tail command in Bash to print all but the first 1000 lines from a file. Here's the command:

tail -n +1001 filename.txt

This will output all lines of the file filename.txt starting from line 1001 and onward, effectively skipping the first 1000 lines.

The -n option specifies the number of lines to display, and the +1001 argument tells tail to start printing from the 1001st line. If you want to save the output to a new file, you can use the output redirection operator > like this:

tail -n +1001 filename.txt > newfile.txt

This will save the output to a new file called newfile.txt in the current directory.

You can use the tail command in Bash to print all but the first 1000 lines from a file. Here's the command:

tail -n +1001 filename.txt

This will output all lines of the file filename.txt starting from line 1001 and onward, effectively skipping the first 1000 lines.

The -n option specifies the number of lines to display, and the +1001 argument tells tail to start printing from the 1001st line. If you want to save the output to a new file, you can use the output redirection operator > like this:

tail -n +1001 filename.txt > newfile.txt

This will save the output to a new file called newfile.txt in the current directory.