Pages

Unzip, Untar and unrar (of different extension)


To unzip file with an extension .Z (e.g. foo.Z)

gzip -d foo.Z

This will create a file name foo on the folder.

tar xvjf foo.tar.bz2

(here j uncompresses *.bz2 file)


To extract *.tar.xz file use xf parameters in command

$ tar xf file.tar.xz

Some files are compressed with .tgz (for example parallel_studio_xe_2017_update5_cluster_edition_online.tgz which is available as a free student edition from Intel).

tar -xvzf fftw-3.1.1.tar.gz  or tar -xvf fftw-3.1.1.tar.gz

We can use tar to extract a .tgz file.

tar -xvzf /path/to/yourfile.tgz

Here
x for extract
v for verbose
z for gnuzip
f for file (this 'f' should come last, just before the file name).

Similarly, for *.tar files,
tar -xvf fileName.tar

RAR Format

unrar e fileName.rar

This will extract all the files from .rar.




No comments:

Post a Comment

You may be interested in these posts

Error in image file conversion: convert-im6.q16: not authorized `test.eps' @ error/constitute.c/WriteImage/1037.

This error is because of the vulnerability. This allows remote execution of code using image formats. So, some Linux distributions by defaul...