unzip
unzip
2023-09-27 14:26:42 时间
unzip 功能说明:unzip命令可以解压zip格式的文件。 参数选项: -l 不解压显示压缩包的内容。 -a 指定解压目录 -o 解压时不提示是否覆盖文件。 -v 不会执行解压命令,只是显示详细信息。 查看压缩文件 [root@testdb ~]# touch a.log [root@testdb ~]# ls -l a.log -rw-r--r-- 1 root root 0 Dec 17 20:06 a.log [root@testdb ~]# zip a.log.zip a.log adding: a.log (stored 0%) [root@testdb ~]# ll a.log* -rw-r--r-- 1 root root 0 Dec 17 20:06 a.log -rw-r--r-- 1 root root 160 Dec 17 20:07 a.log.zip [root@testdb ~]# unzip -l a.log Archive: a.log End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. Archive: a.log.zip Length Date Time Name --------- ---------- ----- ---- 0 12-17-2020 20:06 a.log --------- ------- 0 1 file 常规解压的一些例子 说明:解压的文文件如果存在,会提示是否替换。-o参数解压时不提示是否覆盖。-v参数不会执行解压命令,只是查看。 [root@testdb ~]# ll a.log* -rw-r--r-- 1 root root 0 Dec 17 20:06 a.log -rw-r--r-- 1 root root 160 Dec 17 20:07 a.log.zip [root@testdb ~]# unzip a.log.zip Archive: a.log.zip replace a.log? [y]es, [n]o, [A]ll, [N]one, [r]ename: y extracting: a.log [root@testdb ~]# unzip -v a.log.zip Archive: a.log.zip Length Method Size Cmpr Date Time CRC-32 Name -------- ------ ------- ---- ---------- ----- -------- ---- 0 Stored 0 0% 12-17-2020 20:06 00000000 a.log -------- ------- --- ------- 0 0 0% 1 file [root@testdb ~]# unzip -o a.log.zip Archive: a.log.zip extracting: a.log 指定解压目录解压文件 [root@testdb ~]# ll a.log.zip -rw-r--r-- 1 root root 160 Dec 17 20:07 a.log.zip [root@testdb ~]# ll a.log* -rw-r--r-- 1 root root 160 Dec 17 20:07 a.log.zip [root@testdb ~]# unzip -d /tmp/ a.log.zip Archive: a.log.zip extracting: /tmp/a.log [root@testdb ~]# ll /tmp/a.log* -rw-r--r-- 1 root root 0 Dec 17 20:06 /tmp/a.log
相关文章
- unzip:unzip解压文件到指定目录
- unzip和zip指令的使用方法
- _.unzip(array)
- Google Earth Engine ——把reducer统计的数据分别放在不同的列表中打印出来,使用unzip()函数
- Linux系统中压缩和解压缩命令详解(tar、zip、unzip)
- 27Linux - 文件管理(文件压缩解压:zip、unzip)
- Linux中zip压缩和unzip解压缩命令详解
- centos 安装unzip和zip
- Linux命令之unzip
- Ubuntu 使用unzip解压乱码的问题
- CentOS7中zip压缩和unzip解压缩命令详解
- Linux中解压缩命令gzip和unzip的一点说明
- unzip命令
- unzip 解压缩文件命令
- unzip解压到指定目录