|
本帖最后由 O'Reilly 于 2020-6-28 16:14 编辑
(1)unzip命令的简介
- C:\Users\86137\Desktop>unzip -h
- UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send
- bug reports using http://www.info-zip.org/zip-bug.html; see README for details.
- Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
- Default action is to extract files in list, except those in xlist, to exdir;
- file[.zip] may be a wildcard. -Z => ZipInfo mode ("unzip -Z" for usage).
- -p extract files to pipe, no messages -l list files (short format)
- -f freshen existing files, create none -t test compressed archive data
- -u update files, create if necessary -z display archive comment only
- -v list verbosely/show version info -T timestamp archive to latest
- -x exclude files that follow (in xlist) -d extract files into exdir
- modifiers:
- -n never overwrite existing files -q quiet mode (-qq => quieter)
- -o overwrite files WITHOUT prompting -a auto-convert any text files
- -j junk paths (do not make directories) -aa treat ALL files as text
- -C match filenames case-insensitively -L make (some) names lowercase
- -[ DISCUZ_CODE_5 ]nbsp; label removables (-$ => fixed disks) -V retain VMS version numbers
- -X restore ACLs (-XX => use privileges) -s spaces in filenames => '_'
- -M pipe through "more" pager
- See "unzip -hh" or unzip.txt for more help. Examples:
- unzip data1 -x joe => extract all files except joe from zipfile data1.zip
- unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer
复制代码
(2)unzip命令的示例
示例1
查看压缩文件中包含的文件
示例2
-v参数用于查看压缩文件目录信息,但是不解压该文件。-t参数是指测试压缩文件有无损坏,但并不解压。
- unzip -t ffmpeg-20200617-0b3bd00-win64-static.zip
复制代码
示例3
将文件解压到当前目录,如果要解压到指定目录,可以加上-d选项。-o参数是指在不提示的情况下覆盖文件。-n参数是指不覆盖已有文件。
- unzip test.zip
- unzip test.zip -d C:\Users\86137\Desktop\data
- unzip test.zip -o -d C:\Users\86137\Desktop\data
复制代码
示例4
密码加解压
- zip -r tr.zip tr.exe -P 123
- unzip -P 123 tr.zip
复制代码
unzip命令的下载地址:
unzip.zip
(98.6 KB, 下载次数: 0)
|
|