RAR file decompression is not supported by default in Mac OS x systems. The following shows how to use RAR command-line operations in Mac OS X systems.
1. First download the Rar/unrar tool from the Rarlab website;
2. Unzip the downloaded tar.gz compressed package (tar xvf rarosx-5.2.0.tar.gz), automatically create a rar directory under the download directory downloads, which has the Rar/unrar file;
3. Enter Terminal (Command Window control+ space)
4. Go to the newly unzipped RAR directory and use CD Downloads/rar to enter;
5. Install the Unrar and RAR commands separately using the following command:
install unrar command: sudo install-c-o $USER unrar/bin
install rar command: sudo install-c-o $USER rar/bin
6. Test unrar and RAR commands;
Decompression Command: Unrar x compressed-package.rar
Unzip the Xxx.rar compressed package, if the file name has a space, you need to use single quotation marks wrapped up as: ' xxx Xx.rar '
Mac command line compression decompression rar file