How can I get and see few lines from a .gz compressed file without uncompressing it? Is it possible? Say I want first 10 lines of the compressed file on Linux . Please advice me.
zcat command as follows:
zcat filename.gz | head -10 zcat /path/to/filename.tar.gz | head -10
head will output the first
10 lines of files. See zcommands: Read gzip Compressed Text Files On a Fly on Linux and Unix