+3 votes
in Operating Systems by (60.1k points)
I have a very large text file that has been been zipped to save disk space. I want to check the content of that file. How can I see the top 5 rows of the file using Unix command?

1 Answer

+1 vote
by (355k points)
selected by
 
Best answer

If you can unzip your file, you can use 

head -5 your_unzipped_file

If you do not want to unzip your file, you can use 

less your_zipped_file | head -5


...