2018-09-13 10:45:30 1400瀏覽
今天扣丁學堂Linux培訓來給大家介紹一下關于在Linux下如何利用unzip命令實現(xiàn)解壓多個文件的操作,下面我們通過示例代碼來詳細的是介紹一下吧。
[root@autoServer COLLECTION]# ll -s total 24 4 -rw-r--r--. 1 root root 1681 Sep 11 15:38 00004.zip 4 -rw-r--r--. 1 root root 1325 Sep 11 15:38 00005.zip 4 -rw-r--r--. 1 root root 1540 Sep 11 15:43 00010.zip 4 -rw-r--r--. 1 root root 1392 Sep 11 15:43 00011.zip 4 -rw-r--r--. 1 root root 1541 Sep 11 15:48 00016.zip 4 -rw-r--r--. 1 root root 1390 Sep 11 15:48 00017.zip
[root@autoServer COLLECTION]# unzip \*.zip Archive: 00005.zip inflating: GAB_ZIP_INDEX.xml inflating: 15366516000003-BASIC_1004.bcp Archive: 00010.zip replace GAB_ZIP_INDEX.xml? [y]es, [n]o, [A]ll, [N]one, [r]ename: n inflating: 15366518460006-SOURCE_1001.bcp Archive: 00016.zip replace GAB_ZIP_INDEX.xml? [y]es, [n]o, [A]ll, [N]one, [r]ename: A inflating: GAB_ZIP_INDEX.xml inflating: 15366519060012-SOURCE_1001.bcp Archive: 00017.zip inflating: GAB_ZIP_INDEX.xml inflating: 15366519080014-SOURCE_1002.bcp Archive: 00004.zip inflating: GAB_ZIP_INDEX.xml inflating: 15366516000001-BASIC_1003.bcp Archive: 00011.zip inflating: GAB_ZIP_INDEX.xml inflating: 15366518480008-SOURCE_1002.bcp 6 archives were successfully processed.
[root@autoServer COLLECTION]# ll -s total 52 4 -rw-r--r--. 1 root root 294 Sep 11 15:40 15366516000001-BASIC_1003.bcp 4 -rw-r--r--. 1 root root 158 Sep 11 15:40 15366516000003-BASIC_1004.bcp 4 -rw-r--r--. 1 root root 104 Sep 11 15:45 15366518460006-SOURCE_1001.bcp 4 -rw-r--r--. 1 root root 80 Sep 11 15:45 15366518480008-SOURCE_1002.bcp 4 -rw-r--r--. 1 root root 104 Sep 11 15:50 15366519060012-SOURCE_1001.bcp 4 -rw-r--r--. 1 root root 80 Sep 11 15:50 15366519080014-SOURCE_1002.bcp 4 -rw-r--r--. 1 root root 1681 Sep 11 15:38 00004.zip 4 -rw-r--r--. 1 root root 1325 Sep 11 15:38 00005.zip 4 -rw-r--r--. 1 root root 1540 Sep 11 15:43 00010.zip 4 -rw-r--r--. 1 root root 1392 Sep 11 15:43 00011.zip 4 -rw-r--r--. 1 root root 1541 Sep 11 15:48 00016.zip 4 -rw-r--r--. 1 root root 1390 Sep 11 15:48 00017.zip 4 -rw-r--r--. 1 root root 2056 Sep 11 15:45 GAB_ZIP_INDEX.xml
unzip test.zip
unzip -d /temp test.zip
unzip -n test.zip unzip -n -d /temp test.zip
unzip -o test.zip -d /tmp/
unzip -l test.zip
unzip -v test.zip
unzip -t test.zip
【關注微信公眾號獲取更多學習資料】