Compressing multiple files into a single one has been a major task we do with computers. For Windows users, we are familiar with ZIP or RAR. However, for Mac computer gz or tar.gz file is more popular based on the nature macOS was built on with Unix. a .gz file is the outcome of a compressed file made by Gzip utility, which only compresses one file. Instead, tar.gz file is a compressed file made up by serveral single files. That's the difference between .gz and tar.gz file.
By definition, therefore, you should be able to uncompress or unzip the file, and the command to be used for this purpose is 'gunzip'. On a Mac computer, you can use Terminal to run the gunzip command, but there are a few things to remember. You can also use a software utility for this purpose. Both methods are described in detail in the following sections.
Part 1. How to Unzip a Gz or Tar.gz File on Mac via Command Line
Terminal is Apple's equivalent of the Windows shell, which is also known as Command Prompt. Using Terminal, you can easily uncompress a gz file. Once it has been unzipped, the file name will be retained and the .gz extension will be removed. The contents of the file will be extracted to the same directory where the .gz file is. Let's see how to do this on a Mac:
Step 1. Open an instance of Terminal on your Mac by going to Applications >> Utilities and clicking on Terminal.
Step 2. In the Terminal window, use the 'cd' command to take you to the specific folder where your gz file is present. For example, if your file is in ~/xyz/Documents, then type this command followed by Enter: cd ~/xyz/documents
The partial archive decompression is also possible with the Zarchiver Pro. You can open compressed files. Also, from mail application, you can open an archive file using this Zarchiver app. You can extract the following split archives: zip, 7z, and rar (zip.001, 7z.001, part1.rar, z01). #4 Winzip 7 mac. Winzip 7 for mac is a rich-featured utility to zip and unzip files on mac. Though it doesn’t support as many archive formats as other 7-zip alternatives, it offers multiple functions to manage and customize archives. Compress-Archive -Path C: path to files -Update -DestinationPath C: path to archive.zip. How to Unzip Files Using PowerShell. In addition to being able to zip files and folders, PowerShell has the ability to unzip archives. The process is even easier than compressing them; all you need is the source file and a destination for the data ready to. Open Password Protected Zip Files on mac: Compressed files is no big deal, Everyone does it and it is needed too if you want to transfer a large file.ZIP is an archive file format that supports lossless data compression. A.ZIP file may contain one or more files or directories that may have been compressed. Click on the Get and then Install, this will install the application on your Mac OS Installing the Stuffit Expander on App store; After installing, click open or go to Spotlight (Command + Space) and search for “Stuffit Expander”, then open it; Now, click on the Stuffit Expander Icon of application; Locate the zip file that you want to.
Step 3. Now run the following command in the command line of Terminal: gunzip filename.gz
You must be in the same directory as the .gz file, or this command will not work.
The above command will decompress the file and extract the contents into a folder with the same name as the .gz file. However, if there's a file with the same filename already in that folder, you'll get an overwrite prompt. For example, if you have a file called 'Conversation1.doc' in the folder and your .gz file is called 'Conversation1.doc.gz', then you will be prompted to accept or reject an overwrite of the existing file when you run the gunzip command. To automatically overwrite the original, you can force the decompression by using the '-f' switch, in which case your command will need to be as follows. However, you will lose the original file if you do this: gunzip -f filename.doc.gz
There are clearly several issues that you have to watch for. First, you need to make sure that the Terminal shell is running in the same directory as your .gz file. Second, you need to make sure that any file with a similar filename is either renamed or moved to another directory if you want to keep it. Third, if the file is a .tar.gz, then in addition to decompressing the file, you will need a separate archive extractor utility to extract the contents of the .tar file that you get after running the gunzip command. Fourth, if you want to retain a copy of the .gz file, then you need to use a different switch, which is '-k'.
If you are not tech-savvy or have doubts about being able to do such intensive command line work, then you can consider a special software utility for Mac that can do the job for you
Part 2 : How to Extract .gz/tar.gz File on Mac via TunesBro CleanGeeker
This software (TunesBro CleanGeeker) will help you avoid any command line work, and you can easily extract a gz file on your Mac with just a couple of clicks. The CleanGeeker software is essentially a Mac optimization utility that can help manage your Mac's memory resources by cleaning junk, duplicate and other unnecessary files. But it also has some very useful modules such as the Unarchiver (used here to extract gz files), Uninstaller for apps, Eraser for complete data deletion and many more.
In addition to being able to extract gz files, CleanGeeker can also extract other archive file types such as RAR, Zip, Tar, EML, Winmail.dat, Bzip2 and many more. Let's see how to extract a gz file using this versatile software.
Highlights of TunesBro CleanGeeker
- Support multiple archive formats: gz, tar.gz, zip, rar, bzip, etc.
- Remove junk and temporary data from Mac.
- Batch close background apps to release more running memory.
- Uninstall malware or apps that could not be deleted.
Step 1Install and Open TunesBro CleanGeeker on Mac
Download the CleanGeeker DMG file from the official TunesBro website and install it on your Mac. Launch the application and go to the Unarchiver option under Utilities on the left-side panel.
Step 2Import GZ or Tar.GZ File into CleanGeeker
Import the archive file either by clicking on 'Open Archive' or dragging and dropping the gz file in the CleanGeeker window. The extraction process is automatically started, and in a few seconds you'll be able to see the contents of the file. Pdf to pages converter 6 2 1 free.
![Mac Mac](https://cdn.osxdaily.com/wp-content/uploads/2017/11/opening-zip-files-mac-2.jpg)
You can choose to save the contents in a different location or open the file. You can also email the content using an associated email client.
Comment:
The job is done in seconds and requires no additional input, which is why CleanGeeker is one of the most highly regarded Mac utilities. You also get a comprehensive Mac memory management suite when you download the software, which users find to be a big advantage. We recommend using CleanGeeker to extract gz files rather than using the command line method since it's safer, more convenient and more flexible.
Nov 23, 2018 11:02:37 / Posted by Candie Kates to Mac Solution
Related Articles & Tips
Macs usually come with a built-in compression tool called the Archive Utility that zips and unzips files. However, because this tool has relatively basic functionalities, other Mac users opt to use third-party apps. A quick check at the Mac App Store even shows over 50 apps that can be used for zipping and unzipping files.
But what is a zip file by the way?
What is a Zip File?
An archive file format, a Zip file is a collection of one or more files/folders that are compressed into one file for easier transfer and compression purposes. Despite it being a popular file format, many macOS users have reportedly encountered problems with it. According to them, they cannot unzip files in Mac because of the Unzip Error 22: Invalid Argument error message.
Now, before we discuss why the unzip error 22 happens in Macs and how to fix the unzip error 22: invalid argument issue, allow us to discuss everything you need to know about macOS file compression for you to better understand the process.
macOS File Compression
Don’t bother looking for the Archive Utility in the Applications folder because you can’t find it there. Apple intentionally hid it because it’s a core service of the operating system. And when you say core service, it is used by Apple and macOS app developers to enhance the capabilities and features of an application. For instance, Mac Mail uses the Archive Utility to compress and decompress mail attachments. Safari, on the other hand, uses it to decompress downloaded files.
What’s great about this utility is that you can use it without having to launch it. But if you have a number of files to compress and decompress, you can conveniently open it, and then drag and drop files to it. You can access it by going to System > Library > Core Services > Applications.
Zipping a File/Folder
Compressing a file/folder is a relatively easy process. Simply follow the steps below:
- Open the Finder utility.
- Find the file or folder that you want to compress.
- Right-click on it and choose Compress from the list of options that appear.
- You will know if you have successfully compressed the file if you see a new file with the name of the item next to the word The new item should be named Compress [Item Name].
During the compression process, the selected file/folder is compressed. But the original file/folder is left intact. The compressed file/folder version will be stored in the same folder as the original file and will have a .zip file extension.
Zipping Multiple Files/Folders
Compressing multiple files/folders on your Mac is similar to compressing a single file/folder. Swinsian 2 1 2 – music manager and player salaries. The only noticeable difference is the name of the zip file generated.
To zip multiple files/folders on your Mac, here’s what you should do:
- Go to the folder that contains the folders/files you want to compress.
- Select all the items you want to compress. Shift + Click to select a range of folders or files. CMD + Click to select non-adjacent items.
- Once you have made a selection, right-click on any of the items and choose Compress.
- At this point, you already have a zipped file ready. It should have the word Compress in its file name, followed by the number of items selected and the file extension .zip.
Unzipping a File/Folder
Unzipping a file/folder is as easy as zipping one. Simply double-click on the zip file and it will automatically decompress in the same folder where the compressed file is stored.
If the item you decompressed contains more than one file, the decompressed item should retain the name of the original file. If a file with the same name already exists in the current folder, the decompressed file will have a number added to its name.
In case you didn’t know, there is another way to unzip a file/folder. It involves using Terminal, a built-in Mac program.
To use Terminal to unzip a file/folder, follow these steps:
- Open Use Spotlight to search for it.
- Into the text field, input unzip.
- Drag and drop the zip file into Terminal.
- Hit Enter and the file will be unzipped.
Why You Cannot Unzip Files
As perfect as this utility may seem, there are times when you can’t unzip files on your Mac because error messages like the Unzip Error 22: Invalid Argument pop up out of nowhere. Luminar 3 2 0t. Why do they happen? Here are a few reasons:
- Corrupted File – If you downloaded the ZIP file in a browser, there is a chance that it becomes corrupted, especially if you have closed the website prior to the download completion. Even though the file is already in the Download folder, you simply cannot open and unzip the file.
- Large File Content – Another possible reason why error messages appear while unzipping files on your Mac is that the file contains a large file.
- Permissions – In some cases, file permissions keep you from unzipping files. To resolve this, you may have to use third-party software.
- System Junk – Though rare, junk files may trigger the appearance of error messages associated with the Archive Utility.
How to Fix the Unzip Error 22: Invalid Argument Error
Are you looking for ways to resolve the Unzip Error 22: Invalid Argument error that appears while unzipping files on your Mac? If that is the case, then we cannot suggest a direct fix. What we recommend that you do is to try to unzip files using Terminal or simply perform a quick PC scan as junk and suspicious files might be keeping you from unzipping the files.
Unzip files using Terminal.
If double-clicking the file doesn’t work, you can try to unzip it using the Terminal utility. Perhaps, the file is too large that the decompress feature of the Archive Utility cannot handle it.
Don’t worry, though, because unzipping files in Terminal is easy. Just follow the steps below:
Unzip Archive Mac Mail
- Hold the CMD key and press Space to open Spotlight.
- Into the search bar, input Terminal and hit Enter.
- Unzip the file using the command: unzip filename.zip
- Press Enter and the file will be unzipped.
Perform a quick PC scan.
Free Unzip Program For Mac
Still cannot unzip files? Try to perform a quick PC scan. It is possible that junk files are messing with important and core system processes, preventing you from executing or running utilities like Archive.
To perform a quick scan on your Mac, use a third-party Mac Repair tool like Outbyte MacRepair. Once the tool is downloaded and installed on your Mac, scan your system for any junk files and delete them. It should be easy-peasy!
Summary
Unzipping files on a Mac is easy as pie. All you need to do is double-click on the file and that’s it! The Archive Utility will take care of everything for you. However, if you fail to unzip files because of the Unzip Error 22: Invalid Argument issue, don’t panic. You can always try unzipping files using Terminal or just run a quick PC scan.
Do you know other ways to unzip files on a Mac? Share them below!
If you’re running into errors and your system is suspiciously slow, your computer needs some maintenance work. Download Outbyte PC Repair for Windows, Outbyte Antivirus for Windows, or Outbyte MacRepair for macOS to resolve common computer performance issues. Fix computer troubles by downloading the compatible tool for your device.
See more information about Outbyte and uninstall instructions. Please review EULA and Privacy Policy.
See more information about Outbyte and uninstall instructions. Please review EULA and Privacy Policy.