
The bunzip2 command also deletes the compressed file (Product 2 in this case) in the process. MacOS processes the command and restores the uncompressed file. For example, to decompress the test photo file, enter the following command: To decompress bzip2 files using the macOS Terminal, use the bunzip2 command. However, the same command performed on an Apple Keynote presentation reduced the file size substantially from 27.8MB to just 9.1MB following compression. The new resulting file was only slightly smaller at 9.8MB (vs. Using the test photograph, bzip2 didn’t provide significant compression. Note that the bzip2 command subsequently deletes the original file. In this case, bzip2 creates a new file titled Product 2. MacOS will compress the file and create a new file. To compress a file using bzip2 (which dates to the mid 1990s and uses a compression algorithm named after inventors Michael Burrows and David Wheeler), open Terminal and enter the following command: SEE: Research: Apple’s Growing Role in the Enterprise (Tech Pro Research) How to use the bzip2 macOS file compression command ( Note: If you use Terminal frequently, or you want to encourage yourself to use it more often, place the Terminal icon in your Mac’s Dock.) With Terminal open, enter cd documents/marketing to navigate to the Documents directory’s Marketing subdirectory.

For testing purposes, I included 27.2MB of additional files within the same Marketing subdirectory to test compression using a larger variety of file formats, including documents, spreadsheets, photos, and PDFs.īegin by opening Terminal. Also assume the file is located within a Documents subdirectory titled Marketing.

Microsoft adds Copilot AI productivity bot to 365 suiteĦ best alternatives for 2023 (Free & Paid)įor the purpose of the following examples, assume you wish to compress a 10.1MB file titled Product Shot.jpeg. Just open Terminal, found within macOS’ Utilities subdirectory within the Applications folder, to leverage two popular commands: bzip2 and zip. MacOS possesses a number of Terminal commands to enable compressing files, thereby freeing disk space, requiring less storage capacity, and decreasing email attachment size, among other benefits. How to use the zip and bzip2 macOS file compression commandsĪ variety of Mac applications compress files, but two simple commands native to macOS fulfill the same functionality-often more quickly and for less expense.
