2018-09-13 10:45:30 445浏览
今天扣丁学堂Linux培训来给大家介绍一下关于在Linux下如何利用unzip命令实现解压多个文件的操作,下面我们通过示例代码来详细的是介绍一下吧。
[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
【关注微信公众号获取更多学习资料】