zip
zip是比較常用的文件壓縮格式,最大的有點是跨平台,缺點是支援的壓縮率不是很高。
壓縮
zip -r studio.zip directory_to_compress
解壓
unzip studio.zip
tar
好處是只消耗非常少的cpu及時間打包,只是乙個打包工具,並不負責壓縮。
tar -cvf studio.tar directory_to_compress
解包
到當前目錄下
tar -xvf studio.tar
到指定目錄下
tar -xvf studio.tar -c /tmp/extract/
tar.gz
壓縮時不會占用太多的cpu,就可以得到乙個非常理想的壓縮率。
壓縮
tar -zcvf studio.tar.gz directory_to_compress
解壓
到當前目錄
tar -zxvf studio.tar.gz
到指定目錄
tar -zxvf studio.tar.gz -c /tmp/extract/
tar.bz2
這種壓縮格式是這幾種方式中壓縮率最好的
tar -jcvf studio.tar.bz2 directory_to_compress
解壓
到當前目錄
tar -jxvf studio.tar.bz2
到指定目錄
tar -jxvf studio.tar.bz2 -c /tmp/extract/
Ubuntu16 壓縮解壓檔案命令
zip zip是比較常用的文件壓縮格式,最大的有點是跨平台,缺點是支援的壓縮率不是很高。壓縮 zip r studio.zip directory to compress 解壓 unzip studio.zip tar 好處是只消耗非常少的cpu及時間打包,只是乙個打包工具,並不負責壓縮。tar c...
Ubuntu終端檔案的壓縮和解壓縮命
檔案型別 執行動作 命令.tar 解包tar xvf filename.tar tar 打包tar cvf filename.tar dirname gz解壓1 gunzip filename.gz gz解壓2 gzip d filename.gz gz壓縮 gzip filename tar.gz...
Ubuntu 16 深入Ubuntu檔案系統
ubuntu檔案系統的設計目的就是把檔案有序地組織在一起,提供乙個從邏輯上組織檔案的檔案系統。除了檔案的組織外,檔案安全也是檔案系統的設計要點,所以檔案的訪問許可權是檔案系統不可缺少的組成部分 ubuntu檔案系統的組織結構是按一定的邏輯功能劃分的,並且便於使用者訪問和使用。下面是ubuntu重要目...