Add right-click File package compression for Mac Finder (free)

Source: Internet
Author: User
Tags install homebrew

Used to 7-zip and WinRAR on Windows, and came to the Mac and suddenly found no such tool? Mac comes with the Zip tool does make people vomit bad, compression rate must not not to say, because the Mac file name is Unicode encoding, to the GBK encoded Windows on the extracted file name is all garbled there is no? Hidden files on Mac (. Ds_store,. Spotlight-v100 and the like) every time you have to delete a lot of trouble?

In short, it is very easy to use. Although it is useful to not suppress the compression software can be used (such as Entropy), but its ¥123 price a bit of a pit dad, and its many functions are actually not used.

Is there a simple, free way to add a right-click compression to my Mac? Of course, that's 7-zip's Mac transplant version of--p7zip.

Wait ... p7zip seems to be a command-line tool? Do I have to open a terminal to knock commands every time I compress a file? Of course not, although you have to hit a few commands when you start the installation, you don't have to hit another word when you use it. This is once and for all.

In addition, the WinRAR on Windows can perfectly support the 7-zip compression format, and 7-zip can handle the problem of file name encoding well, compression rate and compression/decompression speed is higher than WinRAR. In addition, 7-zip is an open source compression format, and WinRAR is commercially licensed. So now it seems that there is no reason to continue using WinRAR in addition to the habits on Windows.

Installing P7zip

Because P7zip does not publish a binary version of the MAC, only the source package. So, you need to compile the installation on your MAC. Don't be frightened, with Homebrew, everything is simple. Homebrew is a package manager on your Mac that makes it easy to download source packages for many open source command-line tools and compile and install them on your Mac. With it, plus a little bit of courage to face the command line, you'll be able to do more with your Mac without spending a penny.

Open terminal, enter this command, you can install Homebrew:

"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then install the P7zip:

brew install p7zip

OK, now you can use the 7za command:

7za a -m0=LZMA2 -r -x\!.* archive.7z [StuffToArchive]

Explanation of the command parameters:

a
Add to Compressed Package
-m0=LZMA2
Compression algorithms and options, where you specify a LZMA2 algorithm with high speed and fast compression rate
-r
Include Subdirectories and content
-x\!.*
Exclude hidden files under Mac, where the exclamation point represents the use of wildcards, because the exclamation point itself and the command line are conflicting so add a backslash escape
archive.7z
File name of the compressed file to create
[SruffToArchive]
to compress the files/folders, you can enter multiple

For more p7zip command usage, you can enter 7za --help .

Add to Finder right-click menu

The next step is to add p7zip to the Finder's right-click menu. This step is done with the Automator that comes with your Mac. With Automator you can create a service for the finder, which can get the files you select in the Finder and compress them with p7zip.

Download the following files to unzip and then add to the 7-zip compressed file. Workflow into the ~/library/services directory. Now you can select some files in the Finder and click the right mouse button to see. (if the corresponding option does not appear, you may need to restart the Finder, enter it in the terminal killall Finder )

Add to 7-zip compressed file. Zip

If you are interested, you can try to make this service in Automator yourself.

Unzip tool

As for the decompression tool, I recommend the unarchiver. This is a free, very simple tool that uses the same tools as the MAC's own decompression tool.

https://hyjk2000.github.io/2013/10/24/add-instant-file-archiving-for-mac-finder-for-free/

Add right-click File package compression for Mac Finder (free)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.