7zr 命令详解

| 选择喜欢的代码风格  

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

7zr 命令安装:


-bash/zsh: 7zr command not found

#Debian
apt-get install p7zip

#Ubuntu
apt-get install p7zip

#Alpine
apk add p7zip

#Arch Linux
pacman -S p7zip

#Kali Linux
apt-get install p7zip

#Fedora
dnf install p7zip

#OS X
brew install p7zip

#Raspbian
apt-get install p7zip

#Docker
docker run cmd.cat/7zr 7zr

7zr 命令补充说明:


7-Zip 是具有最高压缩率的文件存档器。该程序支持 7z实现 LZMA 压缩算法),ZIP、CAB、ARJ、GZIP、BZIP2、TAR、CPIO、RPM 和 DEB 格式。新的 7z 格式的压缩率比ZIP格式的压缩率高 30-50%。

7zr 是具有高压缩率格式的文件存档器。 7zr 是 7zalight-version 。 7zr 仅处理 7z、LZMA2 和 XZ 格式的无密码存档。

7zr 命令语法:


7zr <command> [<switches>... ] <archive_name> [<file_names>... ] [<@listfiles>... ]

7zr 命令选项:


a      Add files to archive

b      Benchmark

d      Delete files from archive

e      Extract files from archive (without using directory names)

h      Calculate hash values for files

i      Show information about supported formats

l      List contents of archive

rn     Rename files in archive

t      Test integrity of archive

u      Update files to archive

x      eXtract files with full paths

--------------------------------------------------------

FUNCTION LETTERS
     a    Add

     d    Delete

     e    Extract

     l    List

     t    Test

     u    Update

     x    eXtract 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

     -l   don't  store symlinks; store the files/directories they
          point to (CAUTION : the scanning stage  can  never  end
          because of recursive symlinks like 'ln -s .. ldir')

     -m{Parameters}
          Set           Compression          Method          (see
          /usr/share/doc/p7zip/DOCS/MANUAL/switches/method.htm
          for a list of methods)



Mohammed Adnene TrLasttchange: September 1 2006                 1






User Commands                                              7zr(1)



     -mhe=on|off
          7z  format  only  :  enables or disables archive header
          encryption (Default : off)

     -o{Directory}
          Set Output directory

     -p{Password}
          Set Password

     -r[-|0]
          Recurse subdirectories (CAUTION: this flag does not  do
          what you think, avoid using it)

     -sfx[{name}]
          Create SFX archive

     -si  Read  data  from  StdIn (eg: tar cf - directory | 7zr a
          -si directory.tar.7z)

     -so  Write data to StdOut (eg: 7zr x -so directory.tar.7z  |
          tar xf -)

     -slt Sets technical mode for l (list) command

     -v{Size}[b|k|m|g]
          Create volumes

     -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]
          Update options

     -w[path]
          Set Working directory

     -x[r[-|0]]]{@listfile|!wildcard}
          Exclude filenames

     -y   Assume Yes on all queries

DIAGNOSTICS
     7-Zip returns the following exit codes:

          0    Normal (no errors or warnings detected)

          1    Warning  (Non  fatal  error(s)). For example, some
               files cannot be read during compressing.  So  they
               were not compressed

          2    Fatal error

          7    Bad command line parameters

7zr 命令参数:


目标文件

7zr 命令实例:


7zr 命令存档文件或文件夹:

7zr a archived.7z path/to/file

7zr 命令提取具有原始目录结构的现有7z文件:

7zr x archived.7z

7zr 命令列出存档文件的内容:

7zr l archived.7z

7zr 命令扩展阅读:




7zr 命令评论

共收录到 511Linux 命令