Compressed Format For Linux

来源:互联网 发布:c语言反三角函数 编辑:程序博客网 时间:2024/06/01 08:33

Compressed Format For Linux

2017.1.31 N37°31′ E121°21

I am just studing linux system, so summarizing and writing the format of compressed.

compressed format

  • .zip

  • .bz2

  • .gz

  • .tar.gz

  • .tar.bz2


.zip

form:

zip newname sourcenamezip -r newname sourcedirectory

decompression

unzip filename

.gz

form

gzip sourcefile //After compressing,the soucefile will be disappearing. gzip -c sourcefile > compressfile//The source file will be saved.gzip -r catalogue//It compresses all file which belong to the catalogue, nevertheless it can't compress the catalogue.

.bzip2

form

bzip2 sourcefile //It can't reserve the file.bzip2 -k sourcefile //Reserved the source file.   *The "bzip2" can't compress catalogues.

decompression

bunzip2 compressfile

.tar

Package

tar -cvf packedname sourcefile-c:packed-v:exportfs -f:designation the new name which after packing

Depackage

tar -xvf filename

Compressio AND Decompression

.tar.gztar -zcvf pressname(.tar.gz) sourcefiletar -zxvf pressname(.tar.gz).tar.bz2tar -jcvf pressname(.tar.bz2) sourcefiletar -jxvf pressname(.tar.ba2) 

END

0 0