Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)
edited by
How do I reduce the size of a file using a tail?

I just need one last 1000 lines of the file. I need my trimmed file name to remain the same.

1 Answer

0 votes
by (36.8k points)

Use the below command:

tail -1000 file.txt

To make a new file

tail -1000 file.txt > newfile.txt

To know about Linux join the Linux training

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Dec 13, 2020 in Linux by blackindya (18.4k points)
0 votes
1 answer
asked Dec 12, 2020 in Linux by blackindya (18.4k points)
...