Compression and decompression commands commonly used under Linux

  
        

.tar (Note: tar is packaged, not compressed!)

Unpacking:

tar xvf FileName.tar

Packaging:

Tar cvf FileName.tar DirName

.gz

Unpacking 1:

gunzip FileName.gz

Unpacking 2:

gzip - d FileName.gz

Compression:

gzip FileName

.tar.gz and .tgz

Unpacking:

tar zxvf FileName .tar.gz

Compression:

tar zcvf FileName.tar.gz DirName

tar is used in conjunction with the find command

will be queried according to your own conditions The file name is written to a file tmp.list

find /tmp -cmin +24 > tmp.list

Then add all the files recorded in the file to the archive

tar -T tmp.list -czvf tmp.expire.tar.gz

.bz2

Decompression 1:

bzip2 -d FileName.bz2

Unpacking 2:

bunzip2 FileName.bz2

Compression:

bzip2 -z FileName

.tar.bz2

Unzip:

tar jxvf F ileName.tar.bz2

Compression:

tar jcvf FileName.tar.bz2 DirName

.bz

Decompression 1:

Bzip2 -d FileName.bz

Extract 2:

bunzip2 FileName.bz

Compress: Unknown

.tar.bz

Unpacking:

tar jxvf FileName.tar.bz

Compression: Unknown

.Z

Unpacking:

uncompress FileName.Z

Compression:

compress FileName

.tar.Z

Decompression:

tar Zxvf FileName.tar.Z

Compression:

tar Zcvf FileName.tar.Z DirName

.zip

Unzip:

unzip FileName.zip

Compression:

zip -r FileName.zip DirName

.rar

Decompression:

rar x FileName.rar

Compression :

rar a FileName.rar DirName

.lha

Unpacking:

lha -e FileName.lha

Compression:< Br>

lha -a FileName.lha FileName

.rpm

Unpacking:

rpm2cpio FileName.rpm

Copyright © Windows knowledge All Rights Reserved