+2 votes
in Operating Systems by (3.7k 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 (14.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

...