Linux 7z命令行汇总

x
xiezixing
发布于 5 个月前

命令

描述

参数

案例

a

添加

" a "


7z a archive1.zip subdir\

adds all files and subfolders from folder subdir to archive1.zip.

The filenames in the archive will contain the subdir\ prefix.

7z a archive2.zip .\subdir\*

adds all files and subfolders from folder subdir to archive2.zip.

The filenames in the archive will not contain subdir\ prefix.

7z a Files.7z *.txt -r

adds all *.txt files from current folder and its subfolders to archive Files.7z.

b

检查CPU和内存使用

b [numberofiterations] [-mmt{N}] [-md{N}] [-mm={Method}]

See Benchmark Command, below

d

删除

7z d archive.zip *.bak -r

deletes *.bak files from archive archive.zip.

e

提取

" e "

Possible Query Answers:

Answer

Abbr.

Action

Yes

y


No

n


Always

a

Assume YES for ALL subsequent queries of the same class

Skip

s

Assume NO for ALL subsequent queries of the same class

Quit

q

Quit the program

7-Zip will prompt the user before overwriting existing files unless the user specifies the -y

(Assume Yes on all queries) switch. If the user gives a no answer, 7-Zip will prompt for the

file to be extracted to a new filename. Then a no answer skips that file; or, yes prompts for

new filename.

 

See -y Switch (Assume "Yes" on queries), below, for automated response.

l

列出压缩包中文件

" l "

7z l archive.zip

lists all files from archive archive.zip.

t

测试

" t "

7z t archive.zip *.doc -r

tests *.doc files in archive archive.zip.

u

更新

" u "

7z u archive.zip *.doc

updates *.doc files to archive archive.zip.

x

提取全目录

" x "

7z x archive.zip

extracts all files from the archive archive.zip to the current directory.

7z x archive.zip -oc:\soft *.cpp -r

extracts all *.cpp files from the archive archive.zip to c:\soft folder.

相关文章推荐
评论区
暂未开放
相关文章推荐