广告
返回顶部
首页 > 资讯 > 精选 >zip命令怎么在dos命令行中使用
  • 385
分享到

zip命令怎么在dos命令行中使用

2023-06-08 13:06:56 385人浏览 泡泡鱼
摘要

本篇文章为大家展示了zip命令怎么在dos命令行中使用,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。常用方式:-o (set Output directory) switchSpecifies a

本篇文章为大家展示了zip命令怎么在dos命令行中使用,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。

常用方式:

-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", 指定优化级别
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"设定密码
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!

上述内容就是zip命令怎么在dos命令行中使用,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注编程网精选频道。

--结束END--

本文标题: zip命令怎么在dos命令行中使用

本文链接: https://www.lsjlt.com/news/254252.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • zip命令怎么在dos命令行中使用
    本篇文章为大家展示了zip命令怎么在dos命令行中使用,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。常用方式:-o (set Output directory) switchSpecifies a ...
    99+
    2023-06-08
  • 怎么在dos命令行中使用choice命令
    这期内容当中小编将会给大家带来有关怎么在dos命令行中使用choice命令,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。Choice 命令使用此命令可以让用户输入一个字符,从而运行不同的命令。使用时应该加...
    99+
    2023-06-08
  • 怎么在dos命令行中执行cd命令
    今天就跟大家聊聊有关怎么在dos命令行中执行cd命令,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。显示当前目录名或改变当前目录。 CHDIR [/D] [drive:][path] ...
    99+
    2023-06-08
  • 怎么在dos命令行中执行for命令
    这期内容当中小编将会给大家带来有关怎么在dos命令行中执行for命令,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。for帮助文档对一组文件中的每一个文件执行某个特定命令。 FOR %variable IN...
    99+
    2023-06-08
  • 如何在DOS命令行中使用HaoZip命令压缩文件
    如何在DOS命令行中使用HaoZip命令压缩文件?针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。配置环境变量右键我的电脑——属性——高级系统设置——高级——环境变量,在系统变...
    99+
    2023-06-08
  • 怎么在dos环境中使用MSG命令
    怎么在dos环境中使用MSG命令?很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。MSG 系统自带使用帮助C:\Windows\system32>MSG将消息...
    99+
    2023-06-08
  • DOS中ECHO命令怎么用
    小编给大家分享一下DOS中ECHO命令怎么用,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!ECHO命令是大家都熟悉的DOS批处理命令的一条子命令,但它的一些功能和...
    99+
    2023-06-09
  • dos中del命令怎么用
    这篇文章将为大家详细讲解有关dos中del命令怎么用,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。del命令的用法很简单,使用 "del 文件路径" 的格式就可以了。比如,想删除D盘根...
    99+
    2023-06-09
  • Linux中zip命令怎么用
    这篇文章主要介绍Linux中zip命令怎么用,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!Linux常用命令zip命令 可以用来解压缩文件,或者对文件进行打包操作。zip是个使用广泛的压缩程序,文件经它压缩后会另外产...
    99+
    2023-06-28
  • 怎么在CMD命令行中使用管道命令
    本篇文章为大家展示了怎么在CMD命令行中使用管道命令,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。一、什么是管道命令  管道命令能够将一个命令的执行结果经过筛选,只保留我们需要的信息。  如 dir...
    99+
    2023-06-08
  • DOS中Interlnk、Intersvr命令怎么用
    这篇文章主要介绍DOS中Interlnk、Intersvr命令怎么用,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!  [用  法]   DOS新增支持网络的功能,          &n...
    99+
    2023-06-09
  • DOS中NET LOCALGROUP命令怎么用
    这篇文章主要介绍DOS中NET LOCALGROUP命令怎么用,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!代码如下:net user /add abc ************* /comment:"对此...
    99+
    2023-06-08
  • Python中怎么调用zip命令
    Python中怎么调用zip命令,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。Python调用zip命令例子程序是这样的:#!/usr/bin/Python &...
    99+
    2023-06-17
  • dos中怎么使用shutdown关机命令
    这篇文章给大家分享的是有关dos中怎么使用shutdown关机命令的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。shutdown [-i | -l | -s&nb...
    99+
    2023-06-09
  • python中调用dos命令
    本文是基于window系统下的调用dos命令,在centos下也类似 #encoding:utf-8 ''' Created on 2015年10月10日 @author: ZHOUMEIXU204 ''' import os impo...
    99+
    2023-01-31
    命令 python dos
  • dos中如何使用Country命令
    小编给大家分享一下dos中如何使用Country命令,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!Country 使 MS-DOS 子系统能使...
    99+
    2023-06-09
  • dos中如何使用Compact命令
    这篇文章主要介绍了dos中如何使用Compact命令,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。Compact 显示和更改 NTFS 分区上的文件或目录...
    99+
    2023-06-09
  • dos中如何使用Comp命令
    这篇文章将为大家详细讲解有关dos中如何使用Comp命令,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。Comp 逐字节地比较两个文件或几组文件的内容。Comp 可以比较相同驱动器或不同驱动器上的...
    99+
    2023-06-09
  • dos中如何使用Chkntfs命令
    这篇文章主要介绍dos中如何使用Chkntfs命令,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!Chkntfs 显示或指定在启动计算机时计划的自动系统检查是否在 FAT、FAT32 或者 ...
    99+
    2023-06-09
  • dos中如何使用Call命令
    这篇文章主要介绍dos中如何使用Call命令,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!Call 从一个批处理程序调用另一个批处理程序,并且不终止父批处理程序。call 命令接受用作调用目标的标签。如果在...
    99+
    2023-06-09
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作