ubuntu下常用的壓縮及解壓命令

2021-05-22 02:04:32 字數 481 閱讀 8417

打包:

tar -cvf 打包後的名稱 目標目錄。如: tar -cvf temp.tar temp/

*.tar 檔案的解壓: tar -xvf 要解壓的檔案。如: tar -xvf temp.tar

壓縮:bzip2 要壓縮的檔案。如: bzip2 temp.tar  。然後在當前目錄下就可以看見 temp.tar.bz2的壓縮檔案了。

*.bz2 檔案的解壓。如:bunzip2 temp.tar.bz2。然後看一下,ls -lh 就可以看到temp.tar。

或:bzip2 -d temp.tar.bz2。和上面的效果一樣。

gzip 壓縮檔案。如:gzip temp.tar。 完了之後,ls -lhb 可以看到乙個temp.tar.gz

*.gz 檔案的解壓。如:gunzip temp.tar.gz。然後看一下,ls -lh 就可以看到temp.tar。

或:gzip -d temp.tar.gz。和上面的效果一樣。

Ubuntu下常用壓縮 解壓縮命令

僅打包,並非壓縮 tar xvf filename.tar 解包 tar cvf filename.tar dirname 將dirname和其下所有檔案 夾 打包 解壓 gunzip filename.gz 解壓1 gzip d filename.gz 解壓2 壓縮,只能壓縮檔案 gzip fil...

Ubuntu下常用壓縮 解壓縮命令

壓縮 亞索?僅打包,並非壓縮 tar xvf filename.tar 解包 tar cvf filename.tar dirname 將dirname和其下所有檔案 夾 打包 解壓 gunzip filename.gz 解壓1 gzip d filename.gz 解壓2 壓縮,只能壓縮檔案 gz...

ubuntu 壓縮及解壓檔案

1.壓縮zip zip r archive name.zip directory to compress 2.tar只是打包並不壓縮,好處就是它只消耗非常少的cpu以及時間去打包檔案 tar cvf archive name.tar directory to compress 3.壓縮tar.gz ...