标签:com comm bz2 str recommend erb strong esc --
Common Compress Formation
.zip .gz .bz2 .tar .tar.gz .tar.gz2
// zip [option] descName srcFile/srcName
// -r means path
zip test.zip abc.html
zip test2.zip abc.html abcd.html
// unzip [option] compressedFile
// -d means path
unzip aaa.zip
// compress
gzip -c abc.html > abc.gz // if you just use "gzip abc.html" then the original file will gone
// uncompress
gzip -d abc.html
// compress
bzip2 -k abc.html // if you just use "bzip2 abc.html" then the original file will gone
// uncompress
bzip2 -d abc.html
// tar [option] [-f packageName.tar] srcFile/srcDirectory
// -c package -v verbose
//package
tar -cvf abc.tar abc.html abcd.html bcd.html
//unpackage
tar -xvf abc.tar
/*-z compress and uncompress .tar.gz file */
/*-j compress and uncompress .tar.bz2 file */
// compress and package of .tar.gz
tar -zcvf abc.tar.gz abc.html abcd.html bcd.html // output : abc.tar.gz
//unpackage and uncompress of .tar.gz
tar -zxvf abc.tar.gz
// compress and package of .tar.bz2
tar -jcvf abc.tar.bz2 abc.html abcd.html bcd.html // output : abc.tar.bz2
//unpackage and uncompress of .tar.bz2
tar -jxvf abc.tar.bz2
Linux Compress & Uncompress, Package & Unpackage
标签:com comm bz2 str recommend erb strong esc --
原文地址:https://www.cnblogs.com/nedrain/p/13143959.html