7z 压缩解压工具使用--命令行

压缩:“a” 属于7z的压缩命令 ; "-r" 属于7z的参数 表示递归

7z a CompressFileName Source
7z a CompressFileName Source -r

解压
:“x” 属于7z的解压命令 ; “-o”(字母o)属于7z的参数 表示输出目录(Output) 后面紧跟目录路径, 绝对路径或相对路径 ( 以当前目录为起点 )
7z x CompressFileName 
7z x CompressFileName -o
注:虽然"e"也是7z的解压命令,但与“x”不同,它好像是把所有文件全部解压到当前目录或指定目录中去,具体规则不清楚,解压后的文件很混乱。强烈建议 使用x命令

分卷压缩:
跟压缩所使用的命令或参数基本一致,只不过多了一个"-v"参数,其后紧跟每卷的大小,单位可以是b,k,m,g

其他的请参考下列7z的帮助内容:
Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]
[<@listfiles...>]

< Commands>
a: Add files to archive
b: Benchmark
d: Delete files from archive
e: Extract files from archive (without using directory names)
l: List contents of archive
t: Test integrity of archive
u: Update files to archive
x: eXtract files with full paths
< Switches>
-ai[r[-|0]]{@listfile|!wildcard}: Include archives
-ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
-bd: Disable percentage indicator
-i[r[-|0]]{@listfile|!wildcard}: Include filenames
-m{Parameters}: set compression Method
-o{Directory}: set Output directory
-p{Password}: set Password
-r[-|0]: Recurse subdirectories
-scs{UTF-8 | WIN | DOS}: set charset for list files
-sfx[{name}]: Create SFX archive
-si[{name}]: read data from stdin
-slt: show technical information for l (List) command
-so: write data to stdout
-ssc[-]: set sensitive case mode
-t{Type}: Set type of archive
-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
-v{Size}[b|k|m|g]: Create volumes
-w[{path}]: assign Work directory. Empty path means a temporary directory
-x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
-y: assume Yes on all queries
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值