Mac OS X and macOS both come with a built-in compression system that can zip and unzip files. This integrated system is relatively basic, which is why many third-party apps are also available. A quick look at the Mac App Store reveals more than 50 apps for zipping and unzipping files. Fontlab vi 6 0 9 (6797).
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.
- Press Command+Spacebar and type terminal. Go to the correct directory where the zip file is located. If the zip file is located in your Documents folder, enter the following command in the command prompt: cd /Documents; Now type following command unzip zipfile.zip; The contents of the zip file will decompress into your Documents folder.
- You need only run a simple command to create the split archive, but it’s important that you understand its syntax in order to customize it for your needs. The command is as follows: zip -r -s MaximumSize ArchiveName.zip FolderName/ As the name suggests, the MaximumSize part is the maximum possible size each split file should be.
- Zip -e mac world.zip mac world.jpg. What if it's a folder, rather than a file? This time, instead of a file extension, you would use the '-er' command instead of '-e'. This tells Terminal to.
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.
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>
Zip Mac Terminal
Delete
![Mac zip command line Mac zip command line](https://www.wmlcloud.com/wp-content/uploads/2020/07/connected-glass-mod-1-16-1-1-15-2-minecraft-mod-download-4.jpg)
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? 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 lineGet a secure archiver app
Compress and unpack any files on Mac with Archiver.
The allure of zipped files is simple: they allow you to directly send and receive files, or batches of files, without encroaching on file size limits. Often, email providers have limits on how large attachments can be. Zip files make it easy to bypass that limitation without sending multiple emails.
Zipping files can also be useful for compressing files for storage on your Mac, or an external hard drive.
All-in-one file management
Get 190+ apps to deal with your files in one Setapp suite. Zip and unzip files, edit and search PDFs, change file formats, and more.
How do you open a zip file on a Mac? Or what's the best way to do that? There are, of course, several methods for creating archives, such as built-in utilities, Terminal, and third-party apps. Below, we are going to explore how to unzip files on Mac, how to create zip archives, and showcase some archivers that make it really easy to zip and manage zipped files.
What is a Zip file?
A zip file is a lossless way to compress and archive files and folders. You often encounter zip files in emails, as mentioned, but also when downloading from the internet. If you've ever downloaded an app or extension directly from a developer website, chances are it was a zipped file.
It uses the '.zip' filename, and its icon is typically a folder with a zipper running up the middle. Zipping files is a time-tested method, and is largely unchanged. Its use-cases have expanded, though. We use zip files for sending large files and bundles of PDF or text files, but it's now used as a method to send large folders of images as well as for downloading applications or games from the internet.
How to zip files on a Mac
Before we talk about some special apps and tools, we need to mention built-in macOS's utility that allows you to compress and decompress files and folders. Your Mac's simple Archive Utility, stored in the Applications > Utilities folder, is a simple, direct way to zip files. Its functionality is limited, but it's a decent option for quick zipping and unzipping of files and folders when you need to open zip files someone has sent you.
Here's how to zip a file on Mac with the Archive Utility:
- Find the file or files you want to zip.
Note: if you'd like to zip multiple files, it's best to put those files in the same folder. Then you can proceed to step two. - Right-click on the file or folder.
- Select 'compress'
That's all it takes. Note the zipped file or folder will be created in the same location as the file or folder you zipped. You can move it manually if you like.
If you want to zip multiple files without first adding them to a folder, that's also possible with Archive Utility. Here's how:
- Open the folder with files or folders you want to zip up
- Select the items you want to include in the zip file and right-click on any one of the items.
- Select 'Compress (x) Items' from the pop-up menu.
Once again, a progress bar will display. When the compression is finished, zipped items will be stored in a file called Archive.zip, which will be located in the same folder as the original items.
How to create an encrypted zip archive
Now that you know how to create a zip file on Mac, you may be wondering how to encrypt that zipped file. Archive Utility doesn't allow for this, but you can use the Terminal to accomplish this feat. Here's how:
- Open 'Terminal' from your Applications
- Enter the following command: cd desktop
- Press enter on your Mac's keyboard
- Enter the following command: zip -e [zipped filename]
Note: Do not use brackets. If your filename were 'test.zip', you would enter: zip -e test.zip - Press enter
- Terminal will ask for you to assign and verify a password.
The encrypted file will then appear on your desktop. Opening it will require a password.
We should note this method is clunky, a bit confusing for many – and dealing with Terminal is always a bit nerve-wracking. There's a much better way!
Get BetterZip for all ZIP tasks
Create encrypted ZIP archives and handle compression effortlessly. BetterZip is part of Setapp, so it’s free to try for 7 days.
BetterZip is an app that makes compression and encryption a breeze. In fact, you can set BetterZip up to encrypt all files by default! It uses strong AES-256 encryption, and has the same lossless compression you'll find with any zipping method.
Here's how to encrypt zip files using BetterZip:
- Open BetterZip on your Mac.
- From the menu bar, select 'BetterZip,' and 'Preferences'
- From the 'Presets' menu, select the 'Save' menu
- Select 'Clean and Zip'
- Under 'Encryption method,' select 'Strong (AES-256)'
If you'd like to use the same password for every file you encrypt, you can enter it in the filed just below 'encryption method'. If you don't supply a password, BetterZip will prompt you for one each time you zip and encrypt a file.
BetterZip is impressive for encrypting every zip file you create. If you're looking for a simpler approach, Archiver is the app you're looking for. It uses a drag-and-drop interface, and makes encryption as easy as checking a box and assigning a password. Here's how:
- Open Archiver on your Mac
- Drag the file you want to zip into the app
- Select 'encrypt' if you want to secure the file with a password
- Enter and verify your password
- Select 'Archive'
How to add files to an existing zip file
BetterZip is your best path forward for adding files to an already zipped file. Here's how it's done: Text extractor 1 6 07.
- Open BetterZip on your Mac
- Select the zipped file you want to add new files to
- Select 'Add' from the top of the betterZip window
- Select the file or files you'd like to add to your already zipped file
Note: If you want to add multiple files, you can shift-click to add a list, or command-click to add them one at a time. - Select and hold 'Save' from the top left of the BetterZip window
- In the menu that appears, select 'Clean and Zip'
This creates a new .zip folder with the already-zipped file, as well as the files you added, all of which are now zipped in the same folder.
Unzip files on a Mac
Unzipping files on your Mac is simple. The best method is using the built-in Archive Utility app. The process is simple, and essentially a reversal of the process for zipping a file. Here's how to unzip files:
- Right-click the zipped folder or file you'd like to unzip
- Select 'open with'
- Select 'Archive Utility'
The zipped file or folder will be unzipped. If you'd like to re-zip the file, simple follow the steps we've outlined in this article to zip it again.
How to open zip files as a pro
To open zipped files and folders, both BetterZip and Archive are great options. We especially like BetterZip, here, because each zipped file or folder is previewed in the BetterZip window before you open it up. That way, you always know what you're about to open!
Here's how to unzip files using BetterZip.
- Open BetterZip
- Select the zipped file or folder you want to unzip
- Select 'Extract' from the top of the BetterZip window
Your file or folder will be unzipped.
Here's the method if you choose Archive:
- Open Archive on your Mac
- Select the zipped file or folder you want to unzip
- Drag it to the Archive window
- Select it from the menu
- Select 'Extract' from the bottom of the Archive window
That's all it takes!
Look inside the archive without extraction
Viewing a zipped file without actually unzipping it can be important if you have many zipped files on your computer, or have zipped folders and can't remember where you stuck a particular file.
For this, we like BetterZip. It automatically offers up a preview of zipped files and folders on the right side of its screen. There's no guessing, or fussy methodology. All you have to do is select the file in BetterZip, and the preview loads immediately.
Extract a separate file from a zip archive
Again, we really like BetterZip for this. Here's how to do it:
- Open BetterZip on your Mac
- Select the zipped folder with the file(s) you want to extract
- Right click the file you want to extract
- Select 'Extract Selected' from the drop-down menu
Unzip files and folders using Terminal
Waterfox 56 2 12. If you would rather unzip files using the Terminal, here's how to do it:
- Open Terminal on your Mac
- Change directory to where your zipped file or folder is located using the 'cd' command. (As an example, if your zipped file were in the documents folder, you would enter 'cd documents' into Terminal – without the quotations. Keep in mind if your zipped file is buried in another folder, you will have to change directory until you reach the file's location.)
- Enter the following command: unzip [filename]. (If your file were named zipped-stuff.zip, you would enter 'unzip zipped-stuff.zip' – again, no quotations.)
Setapp lives on Mac and iOS. Please come back from another device.
Meantime, prepare for all the awesome things you can do with Setapp.
Read onMac Zip Command
Sign Up
Setapp uses cookies to personalize your experience on our website. By continuing to use this site, you agree to our cookie policy.