View Tar file without uncompressing


To view a tar file without uncompressing.

Run the below

tar -tvf tarfile

Advertisements

Extract a bzip2 file


To extract data from bzip files use the below.

To extract the file.

bzip2 -d file.bz2

If you want to keep the original file, add the -k option.

bzip2 -dk file.bz2

Use -c option to write out the data.

bzip2 -dc file2.bz2 | grep data