RAR is a file format for data compression and archiving. It was developed by Eugene Roshal and hence the name Roshal ARchive (Thanks to wikipedia for this information).
If you need to uncompress a .rar archive file in Linux OS, u can run the command called unrar. You can install unrar with the help of the following command,
1. If u are using Fedora core/CentOS Linux then use
yum install unrar
2. For Debian Linux,
apt-get install unrar
If the above method doesnt work, You can directly download binary package from the official site here. To be simpler use wget command as below,
$ wget http:// http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz
Both rar and unrar commands are located in rar directory.
After executing the above command, copy rar and unrar to the /bin directory
$ cp rar/unrar /bin
How to use unrar
unrar command supports various options below are common options that you need to use everyday.
To extract the content of the file in current directory type command:
$ unrar e file.rar
(Please note that replace file.rar filename with your actual filename).
To read the contents of rar file:
$ unrar l file.rar
To extract (x) files with full path type command:
$ unrar x file.rar
To test (t) integrity of archive, file type command:
$ unrar t file.rar
If you are using Windows OS then opening rar files is simpler by downloading Winrar utility.