unzip:unzip解壓文件到指定目錄
1、把文件解壓到當前目錄下
unzip test.zip
2、如果要把文件解壓到指定的目錄下,需要用到-d參數。
unzip -d /temp test.zip
3、解壓的時候,有時候不想覆蓋已經存在的文件,那么可以加上-n參數
unzip -n test.zip unzip -n -d /temp test.zip
4、只看一下zip壓縮包中包含哪些文件,不進行解壓縮
unzip -l test.zip
5、查看顯示的文件列表還包含壓縮比率
unzip -v test.zip
6、檢查zip文件是否損壞
unzip -t test.zip
7、將壓縮文件test.zip在指定目錄tmp下解壓縮,如果已有相同的文件存在,要求unzip命令覆蓋原先的文件
unzip -o test.zip -d /tmp/