濮阳杆衣贸易有限公司

主頁 > 知識庫 > 7zip在dos命令行用法總結(jié)

7zip在dos命令行用法總結(jié)

熱門標(biāo)簽:地圖標(biāo)注顯示小區(qū) 征服者博物館地圖標(biāo)注點 江蘇手機外呼系統(tǒng)供應(yīng)商 江蘇辦理400電話是免費的嗎 南京機器人外呼系統(tǒng)多少錢 福建防封電銷卡辦理套餐 滄州外呼增值業(yè)務(wù)線路解決方案 沙依巴克工廠地圖標(biāo)注 紹興400電話怎么辦理

7zip功能很強大,你只要兩個文件,7z.exe以及7z.dll就可以使用命令行工作了。

安裝完7zip軟件后,在其安裝目錄下找到7z.exe和7z.dll兩個文件,將其復(fù)制到C:\Windows\System32便可以在DOS直接應(yīng)用。

常用方式:

-o (set Output directory) switch
Specifies a destination directory where files are to be extracted.

This switch can be used only with extraction commands.

Syntax-o{dir_path} {dir_path} This is the destination directory path. It's not required to end with a backslash. If you specify * in {dir_path}, 7-Zip substitutes that * character to archive name.
Example 7z x archive.zip -oc:\Doc
extracts all files from the archive.zip archive to the c:\Doc directory.

7z x *.zip -o*
extracts all *.zip archives to subfolders with names of these archives.

Usage: 7za command> [switches>...] archive_name> [file_names>...]
[@listfiles...>]

1. "a",添加文件
7z a -t7z files.7z *.txt

2. "d", 刪除文件
7z d archive.zip *.bak -r
從zip文件中刪除所有的*.bak文件

3. "e", 解壓縮
7z e archive.zip

4. "l", 列出文件
7z l archive.zip

5. "t", 測試完整性
7z t archive.zip *.doc -r

6. "u", 更新
7z u archive.zip *.d

7. "x", 與e相同,但保留全路徑

8. "m", 指定優(yōu)化級別
Compression switch: -mx0
What it means: Don't compress at all.
Is called "copy mode."

Compression switch: -mx1
What it means: Very low compression.
It is called "fastest" mode.

Compression switch: -mx3
What it means: Fast compression mode.
Will set various parameters automatically.

Compression switch: -mx5
What it means: Same as above, but "normal."

Compression switch: -mx7
What it means: "maximum" compression.

Compression switch: -mx9
What it means: "ultra" compression.
(You probably want to use this.)

9. "-m"選項:
Switch: -mfb
Function: Specifies # of fast bytes.
Sometimes help with very "sparse" files.
Don't bother.

Switch: -mpass
Function: Number of passes for deflate compression.
Don't bother with this.
Automatically set with levels.

Switch: -md
Function: Specifies dictionary size.
Automatically set, so don't bother.

Switch: -mmt
Function: Enable multithreading.
Use if: you have quad-core and a really huge archive.
Specify "on" or "off".
This may be enabled by default; check the help file.

10. "-t"選項
指定壓縮文件類型
Type switch: -t7z
Format: 7Z
Example filename: archive.7z (default option)

Type switch: -tgzip
Format: GZIP
Example filename: archive.gzip
archive.gz

Type switch: -tzip
Format: ZIP
Example filename: archive.zip (very compatible)

Type switch: -tbzip2
Format: BZIP2
Example filename: archive.bzip2

Type switch: -ttar
Format: TAR
Example filename: tarball.tar (UNIX and Linux)

Type switch: -tiso
Format: ISO
Example filename: image.iso

Type switch: -tudf
Format: UDF
Example filename: disk.udf

7z a -tiso archive.iso
7z a -tudf archive.udf

7z: executable name
a: add to archive
-tiso or -tudf: format of archive to create
archive.iso or archive.udf: name of archive to create

10. 硬壓縮
Switch: -ms=on
Function: Enable solid mode.
This is the default so you won't often need this.

Switch: -ms=off
Function: Disable solid mode.
This is useful when you need to update individual files.
Will reduce compression ratios normally.

11. "-p"設(shè)定密碼
7z a pw.7z *.txt -pSECRET

12. 其它選項:
Switch: -ssc
Function: Specify case-sensitive mode.
Useful for going between Linux and Windows.
Default: -ssc- on Windows (insensitive)
Default: -scc on Linux (sensitive)


Switch: -ssw
Function: Compress locked files.
Use if: you have problems with opening files.

Switch: -w
Function: Set working directory.
Use when you want to specify temp folders.

Switch: -aoa
Overwrite all destination files.

Switch: -aos
Skip over existing files without overwriting.
Use this for files where the earliest version is most important.

Switch: -aou
Avoid name collisions.
New files extracted will have a number appending to their names.
(You will have to deal with them later.)

Switch: -aot
Rename existing files.
This will not rename the new files, just the old ones already there.
Use when the new files are more important.

7z x test.zip -aoa

7z: use the 7-zip executable
x: use the extract command
test.zip: extract files from this archive

-aoa: overwrite all existing files. risky!

標(biāo)簽:湘西 巴中 宜賓 香港 陽泉 烏魯木齊 小程序 吳忠

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《7zip在dos命令行用法總結(jié)》,本文關(guān)鍵詞  7zip,在,dos,命令行,用法,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《7zip在dos命令行用法總結(jié)》相關(guān)的同類信息!
  • 本頁收集關(guān)于7zip在dos命令行用法總結(jié)的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    额济纳旗| 司法| 华安县| 嘉荫县| 定襄县| 灵丘县| 大安市| 施秉县| 阿拉善右旗| 蓝田县| 砀山县| 武陟县| 长顺县| 尚义县| 汝城县| 安陆市| 雅江县| 射洪县| 简阳市| 海原县| 美姑县| 曲水县| 永顺县| 三门峡市| 四子王旗| 聂拉木县| 临颍县| 余姚市| 白银市| 宜川县| 恩施市| 嘉义县| 湖北省| 彰化县| 阿荣旗| 肥西县| 长垣县| 鹤山市| 苍山县| 大田县| 华安县|