+3 votes
in Operating Systems by (6.8k 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

0 votes
by (27.8k points)

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