7-ZIP command line tool version, 7z.exe, allows you to execute commands using the system terminal. 7-Zip is a powerful, open-source, and user-friendly program that offers support for most file archives like 7z, ZIP, RAR, TAR, and GZIp, among others. These characteristics make 7-Zip easy to download and be used for personal or commercial purposes.
By using the command-line version, you can access all features from the terminal even without a Graphical User Interface (GUI). Before we discuss any further about the different commands for 7-Zip, check out 7-Zip for more of our helpful guides.
Which is the best tool, 7-Zip vs WinRAR? Is 7Zip safe? These are some of the questions that you should also clarify before learning how to use 7Zip. You also need to understand the issues with 7-Zip cannot open file as archive that the tool sometimes experiences.
Open/Extract 7z File on Mac. To open/extract 7z file on Mac, you can use B1 Free Archiver. B1 Free Archiver is a free software for creating archive folder and extracting archive file. B1 Archiver works on all platforms - Windows, Linux, Mac and Android. The freeware supports most popular formats including 7z. B1 Free Archiver is compatible with. P7zip - the port of the command line version of 7-Zip to Linux/Posix. On 7-Zip's SourceForge Page you can find a forum, bug reports, and feature request systems. Compression ratio. We compared 7-Zip with WinRAR 5.20. FILE SETS: Mozilla Firefox 34.0.5 for Windows and Google Earth 6.2.2.6613 for Windows. How to Zip a File on Mac. Open a Finder window, then locate the file or folder you want to zip. Right-click on the said file or folder. Select 'Compress' in the drop-down menu you see. The file is then Zipped while the original is left just the way it was. How to Create Zip Files and Folder on Mac. Open a Finder window. The WinZip Command Line Support Add-On gives you the power of WinZip without the usual WinZip graphical user interface. Instead, it allows you to use WinZip directly from the Command Prompt (a command line interface), from batch (.bat) files, and from other script languages, making it ideal for automating repetitive tasks.An extensive set of command line options, outlined in the help file. Use 7-Zip on the command line. Compress, extract, archive and optimize with the 7z.exe executable. 7z is the only file format in 7-Zip that you can specify whether the archive is solid or not. Solid makes it impossible to use the 'u' command to update individual files.
7-Zip can be used to compress, extract, test run-list, add, and update archive files. The 7z.exe version works with Windows, while 7-Zip is the command-line version for Linux, Mac OS X, and UNIX. The 7z format has several main features that include open architecture, high ratio, and secure AES – 256 encryption options. This software lets you use any compression or encryption method. The format supports file sizes of up to 16000000GB and Unicode file names. In the next section, we’ll be showing you some of the common commands that are used with this software.
Contents
- 9 Switches
- 9.1 Frequently Asked Questions
Command Examples for Windows
The 7-Zip command-line executable file is the 7za.exe. You can use the EXE file to run commands on archives. In our examples, we’ll be using “C:UsersName” as our user directory. Below is a step-by-step guide to getting you started on the command line:
- Before proceeding to other commands, one helpful tip is to place 7za.exe in your directory. This will give you convenience since you won’t have to change the environment paths.
- Launch the Windows console and test the 7za.exe program out using a few commands
- Type in the exe name, 7za, to display the file details
On the command line, the default command and output looks like this:
7za <command> [<switches>…] <archive_name>
[<file_names>…]
[<@listfiles…>]
[<file_names>…]
[<@listfiles…>]
Before we proceed with our examples, check out other guides, and reviews on our website. You might be interested in our 7-Zip vs WinRAR review and our 7-Zip password protect guide.
Function Letter Command
In this section, we’re going walk you through function letter commands. Because they are only single letters, they are quite easy to memorize.
Aside from looking for the details about 7-Zip download for PC or for Linux, it is important to have idea about archive error. Because the command line is useless if you don’t know how to fix 7-Zip cannot open file.
Archive and Add to ZIP
The function letter a command is used to put data in the archives. This “a” command stands for “archive” or “add.” To do this successfully, you must specify the archive location and the source files. Using the command will look like this on the terminal line:
C:UsersName>7za a -t7z files.7z *.txt
7-Zip (A) 4.60 beta Copyright (c) 1999-2008 Igor Pavlov 2008-08-19
Scanning
Creating archive files.7z
Compressing fileA.txt
Compressing fileB.txt
Everything is Ok
C:UsersName>
7-Zip (A) 4.60 beta Copyright (c) 1999-2008 Igor Pavlov 2008-08-19
Scanning
Creating archive files.7z
Compressing fileA.txt
Compressing fileB.txt
Everything is Ok
C:UsersName>
Delete
The function letter d command is used for removing a particular file or files from an archive. This “d” command stands for delete. Using the command will look like this on the terminal line:
7z d example.zip *.bak -r
Let’s break down the command so you won’t get confused. The command stands for the following:
7z: use the executable file
d: delete files
example.zip: delete from this archive
*.bak: only match bak files
-r: traverse all subdirectories
d: delete files
example.zip: delete from this archive
*.bak: only match bak files
-r: traverse all subdirectories
Extract and Enlarge
The function letter e command is useful when there is no substantial archive. The “e” command stands for extract to unzip or enlarge and archive. Using the command will look like this on the terminal line:
7z e example.zip
Again, let’s break it down to help you understand. In this command, we see the following words/commands:
7z: use the executable file
e: use the extract command
example.zip: the source archive you are expanding
e: use the extract command
example.zip: the source archive you are expanding
Meanwhile, the function letter x command works the same way with e. The difference is it preserves the full paths. This is useful if you have an elaborate or important directory structure. Also, this is useful for backups. Using the command on the terminal looks like this:
7z x example.zip
In this command, we see the following words/commands:
7z: use the executable file
x: use the extract command
example.zip: the archive where you want to extract all the files from
x: use the extract command
example.zip: the archive where you want to extract all the files from
List
This function letter lowercase L command is used to list the archive contents. The “l” command stands for list. However, you may not need to use this command it often. Using the command on the terminal looks like this:
C:UsersName>7za l files.7z
Test
This function letter t command is used to test the integrity of archives. The “t” command stands for test. However, this is much less useful than the “-t” switch. Using the command on the terminal looks like this:
7z t example.zip *doc -r
In this command, we see the following words/commands:
7z: use the executable file
t: test the specific archive
example.zip: the archive to be tested
*.doc: test all the doc files in the archive
-r: recurse all the child directories
t: test the specific archive
example.zip: the archive to be tested
*.doc: test all the doc files in the archive
-r: recurse all the child directories
Update
This function letter u command is used to replace old files in your archive with newer files. The “u” command stands for update. This command prevents needing to decompress and recompress the entire archive. This command will not work with solid archives. Using the command on the terminal looks like this:
7z u example.zip *.doc
We see the following words/commands:
7z: use the executable file
u: update command
example.zip: the archive you want to update files in
*.doc: only update the doc files
u: update command
example.zip: the archive you want to update files in
*.doc: only update the doc files
Switches
Another command that we see on the command line is the switch. The switch is composed of a switch specifier and the name of the switch. The specifier is either a dash (-) or a forward slash (/). Switches often look like this:
Below is a list of common switches:
Frequently Asked Questions
? How to use the 7-Zip command line?Launch window and run the version of 7-Zip you are using by entering “7z” for P7Zip (7z.exe), or “7za” for 7-Zip in Windows (7za.exe) to either run the P7-Zip or 7za application before you enter commands. After that, you can use any of the commands listed above. Make sure that you’re following the syntax when typing in your commands.
? How to extract with 7-Zip command line? 7z File Extractor Mac
You can use the e or x commands to extract ZIP files.
? How to create a 7-Zip file command line? Use the “a” command to create a new archive file which can end in 7z, XZ, GZIP, TAR, ZIP, and many more.
? How to zip a file using 7-Zip command line? Use the “a” command to add files to the ZIP file.
7-Zip Command Line: Conclusion
Even without a GUI, you can use all the features of 7Zip on the command line. Just as long as you familiarize yourself with some of the commands, you’ll get better with practice. Did we miss any commands on our list? Let us know by leaving us a message in the comment section below.
7zip command line7z is a compressed archive file format that supports several different data compression, encryption and pre-processing algorithms. The 7z format initially appeared as implemented by the 7-Zip archiver.
The 7z format provides the following main features:
Unzip For Mac
- Open, modular architecture which allows any compression, conversion, or encryption method to be stacked.
- High compression ratios (depending on the compression method used)
- Rijndael/AES-256 encryption.
- Large file support (up to approximately 16 exbibytes).
- Unicode file names
- Support for solid compression, where multiple files of like type are compressed within a single stream, in order to exploit the combined redundancy inherent in similar files.
- Compression and encryption of archive headers.
- Support for multi-part archives : e.g. xxx.7z.001, xxx.7z.002, .. (see the context menu items Split File.. to create them and Combine Files.. to re-assemble an archive from a set of multi-part component files)
The format's open architecture allows additional future compression methods to be added to the standard.
While 7z compression uses the LZMA method by default, the 7z format also supports the PPMD, BCJ, BCJ2, BZip2, and Deflate compression methods.
The 7z format supports encryption with the AES algorithm with a 256-bit key. The key is generated from a user-supplied passphrase using an algorithm based on the SHA-256 hash function.
Open/Extract 7z File on Windows
7z is a native format of 7-Zip. To open/extract 7z file, you can use 7-Zip or Easy 7-Zip. The Easy 7-Zip is an easy-to-use version of 7-Zip. The open source freeware keeps all features of 7-Zip and adds a few useful features that makes the software more user-friendly.
Easy 7-Zip works on Windows 10/8.1/8/7/Vista/2008/2003/XP/2000 (both 32-bit and 64-bit compatible).
- Free Download Easy 7-Zip
- Install Easy 7-Zip by step-by-step instructions
- The installation will associate 7z with Easy 7-Zip automatically
- Double-click on 7z file to open 7z file with Easy 7-Zip
- Alternatively, Right-click on 7z file on Windows Explorer
- Done
You will see files or folders within the 7z file then, click button Extract to extract the 7z file.
And then, choose Extract files.., Extract Here, or Extract to 'folder' to extract the 7z file.
Easy 7-Zip Download Links:
Open/Extract 7z File on Mac
To open/extract 7z file on Mac, you can use B1 Free Archiver. B1 Free Archiver is a free software for creating archive folder and extracting archive file. B1 Archiver works on all platforms - Windows, Linux, Mac and Android. The freeware supports most popular formats including 7z.
B1 Free Archiver is compatible with:
- Mac OS X 10.9 Mavericks
- Mac OS X 10.8 Mountain Lion
- Mac OS X 10.7 Lion
- Mac OS X 10.6 Snow Leopard
Open/Extract 7z File on Linux
You need to install p7zip. p7zip is command line port of 7-Zip for POSIX systems like Unix (Linux, Solaris, OpenBSD, FreeBSD, Cygwin, AIX, ..), MacOS X and also for BeOS and Amiga.
7z Extractor Mac
Install p7zip-full on CentOS and Fedora
# yum install p7zip-full |
Install p7zip-full on Debian and Ubuntu
$ sudo apt-get install p7zip-full |
Extract a 7z file on Linux
$ 7za e sample.7z |
![Extractor Extractor](https://www.lifewire.com/thmb/o5A_BD4vSIA8hq1NSUF7Q3yugKk=/1002x668/filters:no_upscale()/unzip-command-ubuntu-show-files-5b1596c61d64040036da7c37.png)
- 7za - command name
- e - specifies the 7z to be extracted
- sample.7z - is the file that is to be extracted
Hangaroo 2. To extract with full paths, use the following command:
$ 7za x sample.7z |