Linux:解压【*.7z】
RPM:p7zip
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
[root@ansible-server ~]# yum list | grep p7zip Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration p7zip.x86_64 16.02-2.el7 epel p7zip-gui.x86_64 16.02-2.el7 epel p7zip-plugins.x86_64 16.02-2.el7 epel [root@ansible-server ~]# [root@ansible-server ~]# yum install -y p7zip Loaded plugins: fastestmirror, langpacks Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Loading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.163.com * updates: mirrors.aliyun.com Resolving Dependencies --> Running transaction check ---> Package p7zip.x86_64 0:16.02-2.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================= Package Arch Version Repository Size ================================================================================================================= Installing: p7zip x86_64 16.02-2.el7 epel 651 k Transaction Summary ================================================================================================================= Install 1 Package Total download size: 651 k Installed size: 1.9 M Downloading packages: p7zip-16.02-2.el7.x86_64.rpm | 651 kB 00:00:01 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : p7zip-16.02-2.el7.x86_64 1/1 Verifying : p7zip-16.02-2.el7.x86_64 1/1 Installed: p7zip.x86_64 0:16.02-2.el7 Complete! [root@ansible-server ~]# [root@ansible-server python]# rpm -qa | grep p7zip p7zip-16.02-2.el7.x86_64 [root@ansible-server python]# [root@ansible-server python]# rpm -ql p7zip-16.02-2.el7.x86_64 /usr/bin/7za /usr/libexec/p7zip /usr/libexec/p7zip/7zCon.sfx /usr/libexec/p7zip/7za /usr/share/doc/p7zip /usr/share/doc/p7zip/7zC.txt /usr/share/doc/p7zip/7zFormat.txt /usr/share/doc/p7zip/ChangeLog /usr/share/doc/p7zip/MANUAL /usr/share/doc/p7zip/MANUAL/cmdline /usr/share/doc/p7zip/MANUAL/cmdline/commands /usr/share/doc/p7zip/MANUAL/cmdline/commands/add.htm /usr/share/doc/p7zip/MANUAL/cmdline/commands/bench.htm /usr/share/doc/p7zip/MANUAL/cmdline/commands/delete.htm /usr/share/doc/p7zip/MANUAL/cmdline/commands/extract.htm /usr/share/doc/p7zip/MANUAL/cmdline/commands/extract_full.htm /usr/share/doc/p7zip/MANUAL/cmdline/commands/hash.htm /usr/share/doc/p7zip/MANUAL/cmdline/commands/index.htm /usr/share/doc/p7zip/MANUAL/cmdline/commands/list.htm /usr/share/doc/p7zip/MANUAL/cmdline/commands/rename.htm /usr/share/doc/p7zip/MANUAL/cmdline/commands/style.css /usr/share/doc/p7zip/MANUAL/cmdline/commands/test.htm /usr/share/doc/p7zip/MANUAL/cmdline/commands/update.htm /usr/share/doc/p7zip/MANUAL/cmdline/exit_codes.htm /usr/share/doc/p7zip/MANUAL/cmdline/index.htm /usr/share/doc/p7zip/MANUAL/cmdline/style.css /usr/share/doc/p7zip/MANUAL/cmdline/switches /usr/share/doc/p7zip/MANUAL/cmdline/switches/ar_exclude.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/ar_include.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/ar_no.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/bb.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/bs.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/charset.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/exclude.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/include.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/index.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/large_pages.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/list_tech.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/method.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/output_dir.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/overwrite.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/password.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/recurse.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/sa.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/scc.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/scrc.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/sdel.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/sfx.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/shared.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/sni.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/sns.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/spf.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/ssc.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/stdin.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/stdout.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/stl.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/stop_switch.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/stx.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/style.css /usr/share/doc/p7zip/MANUAL/cmdline/switches/type.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/update.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/volume.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/working_dir.htm /usr/share/doc/p7zip/MANUAL/cmdline/switches/yes.htm /usr/share/doc/p7zip/MANUAL/cmdline/syntax.htm /usr/share/doc/p7zip/MANUAL/fm /usr/share/doc/p7zip/MANUAL/fm/about.htm /usr/share/doc/p7zip/MANUAL/fm/benchmark.htm /usr/share/doc/p7zip/MANUAL/fm/index.htm /usr/share/doc/p7zip/MANUAL/fm/menu.htm /usr/share/doc/p7zip/MANUAL/fm/options.htm /usr/share/doc/p7zip/MANUAL/fm/plugins /usr/share/doc/p7zip/MANUAL/fm/plugins/7-zip /usr/share/doc/p7zip/MANUAL/fm/plugins/7-zip/add.htm /usr/share/doc/p7zip/MANUAL/fm/plugins/7-zip/extract.htm /usr/share/doc/p7zip/MANUAL/fm/plugins/7-zip/index.htm /usr/share/doc/p7zip/MANUAL/fm/plugins/7-zip/style.css /usr/share/doc/p7zip/MANUAL/fm/plugins/index.htm /usr/share/doc/p7zip/MANUAL/fm/plugins/style.css /usr/share/doc/p7zip/MANUAL/fm/style.css /usr/share/doc/p7zip/MANUAL/general /usr/share/doc/p7zip/MANUAL/general/7z.htm /usr/share/doc/p7zip/MANUAL/general/faq.htm /usr/share/doc/p7zip/MANUAL/general/formats.htm /usr/share/doc/p7zip/MANUAL/general/index.htm /usr/share/doc/p7zip/MANUAL/general/license.htm /usr/share/doc/p7zip/MANUAL/general/performance.htm /usr/share/doc/p7zip/MANUAL/general/style.css /usr/share/doc/p7zip/MANUAL/general/thanks.htm /usr/share/doc/p7zip/MANUAL/start.htm /usr/share/doc/p7zip/MANUAL/style.css /usr/share/doc/p7zip/Methods.txt /usr/share/doc/p7zip/README /usr/share/doc/p7zip/lzma.txt /usr/share/doc/p7zip/readme.txt /usr/share/doc/p7zip/src-history.txt /usr/share/licenses/p7zip-16.02 /usr/share/licenses/p7zip-16.02/License.txt /usr/share/licenses/p7zip-16.02/copying.txt /usr/share/man/man1/7za.1.gz [root@ansible-server python]# |
解压命令:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
[root@ansible-server python]# 7za -h 7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz (306C3),ASM,AES-NI) Usage: 7za <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) 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 <Switches> -- : Stop switches parsing -ai[r[-|0]]{@listfile|!wildcard} : Include archives -ax[r[-|0]]{@listfile|!wildcard} : eXclude archives -ao{a|s|t|u} : set Overwrite mode -an : disable archive_name field -bb[0-3] : set output log level -bd : disable progress indicator -bs{o|e|p}{0|1|2} : set output stream for output/error/progress line -bt : show execution time statistics -i[r[-|0]]{@listfile|!wildcard} : Include filenames -m{Parameters} : set compression Method -mmt[N] : set number of CPU threads -o{Directory} : set Output directory -p{Password} : set Password -r[-|0] : Recurse subdirectories -sa{a|e|s} : set Archive name mode -scc{UTF-8|WIN|DOS} : set charset for for console input/output -scs{UTF-8|UTF-16LE|UTF-16BE|WIN|DOS|{id}} : set charset for list files -scrc[CRC32|CRC64|SHA1|SHA256|*] : set hash function for x, e, h commands -sdel : delete files after compression -seml[.] : send archive by email -sfx[{name}] : Create SFX archive -si[{name}] : read data from stdin -slp : set Large Pages mode -slt : show technical information for l (List) command -snh : store hard links as links -snl : store symbolic links as links -sni : store NT security information -sns[-] : store NTFS alternate streams -so : write data to stdout -spd : disable wildcard matching for file names -spe : eliminate duplication of root folder for extract command -spf : use fully qualified file paths -ssc[-] : set sensitive case mode -ssw : compress shared files -stl : set archive timestamp from the most recently modified file -stm{HexMask} : set CPU thread affinity mask (hexadecimal number) -stx{Type} : exclude archive type -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 [root@ansible-server python]# |
执行解压:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
[root@ansible-server python]# pwd /software/python [root@ansible-server python]# [root@ansible-server python]# ls -ltr total 7600 -rw-r--r-- 1 root root 7780708 Jul 21 00:08 Easy Python Decompiler v1.3.2.7z [root@ansible-server python]# [root@ansible-server python]# du -sh * 7.5M Easy Python Decompiler v1.3.2.7z [root@ansible-server python]# [root@ansible-server python]# 7za x Easy\ Python\ Decompiler\ v1.3.2.7z 7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz (306C3),ASM,AES-NI) Scanning the drive for archives: 1 file, 7780708 bytes (7599 KiB) Extracting archive: Easy Python Decompiler v1.3.2.7z -- Path = Easy Python Decompiler v1.3.2.7z Type = 7z Physical Size = 7780708 Headers Size = 497 Method = LZMA:25 BCJ2 Solid = + Blocks = 2 Everything is Ok Files: 12 Size: 9922903 Compressed: 7780708 [root@ansible-server python]# [root@ansible-server python]# ls -ltr total 17312 -rw-r--r-- 1 root root 9826 Jan 10 2009 mingwm10.dll -rw-r--r-- 1 root root 20480 Jun 22 2009 libgcc_s_dw2-1.dll -rw-r--r-- 1 root root 3968000 Mar 23 2012 QtGui4.dll -rw-r--r-- 1 root root 1003008 May 15 2013 python27.dll -rw-r--r-- 1 root root 3478512 Jan 23 2014 lib -rw-r--r-- 1 root root 21504 Mar 30 2014 engine1.dll -rw-r--r-- 1 root root 1071616 Jul 5 2014 QtCore4.dll -rw-r--r-- 1 root root 29184 Jan 28 2015 versionchecker.dll -rw-r--r-- 1 root root 102400 Sep 20 2015 engine2.dll -rw-r--r-- 1 root root 215552 Sep 20 2015 EasyPythonDecompiler.exe -rw-r--r-- 1 root root 1590 Sep 20 2015 readme.txt -rw-r--r-- 1 root root 1231 Sep 20 2015 changelog.txt -rw-r--r-- 1 root root 7780708 Jul 21 00:08 Easy Python Decompiler v1.3.2.7z [root@ansible-server python]# [root@ansible-server python]# |
——————————————————————————
Done。