Friday, August 16, 2013

Read a Compressed files without the mess

From Commands I Always Forget...

>Read a text file in a zip inplace


use less to read a text file in a zip:
unzip -p [archive.zip] [inner/zip/path/to/file.txt] | less
unzip -c [archive.zip] [inner/zip/path/to/file.txt] | less
In a tar.gz
tar --to-stdout -zxf file.tar.gz | less
or just a file that is gzipped
gzip -c file.gz | less

No comments:

Post a Comment