What is RAR file:
RAR files are in compressed archive format,
if you have downloaded rar files from the Internet, you need to unpack
or unrar them (extract rar files). RAR is a proprietary file format for
data compression and archiving, developed by Eugene Roshal.
RAR on *NIX:
Under *NIX (Any Linux or Unix variant), to
extract RAR files you can use command called unrar. By default unrar is
not being installed on *NIX OS. You can install unrar command with the
help of apt-get or yum command. Don’t like these! Don’t worry source file is always waiting for you to be downloaded at
their site:-). So let’s go on with the proceedings guys.
Install unrar:
* Under Debian Linux variants, use apt-get:
# apt-get install unrar-free
Note that in case of Debian you have to install unrar-free.
* Using RHEL or Fedora ??? Go for yum then:
# yum install unrar
Special Note on Fedora Core:
You need to point out to use dag RPM Repository for unrar command under Fedora Core Linux. To do so do as following:
1. Put the following lines in /etc/yum.conf file:
[dag]
name=Dag RPM Repository for Fedora Core
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
name=Dag RPM Repository for Fedora Core
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
2. Import PGP key:
# rpm –import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
3. Upgrade your system:
# yum update
# yum update
4. Install unrar:
# yum install unrar
# yum install unrar
Or just download the RPM file from dag site.
* On FreeBSD do:
# pkg_add -v -r unrar
* Unhappy with any of the methods above or it doesn’t suit you!!!
1. Download binary package from official rarlab site:
http://www.rarlab.com/download.htm
http://www.rarlab.com/download.htm
or do:
2. Untar file:
$ tar -zxvf rarlinux-3.8.0.tar.gz
3. Both unrar and rar commands are located in rar directory. Just go to rar directory:
$ cd rar
$ ./unrar
$ ./unrar
4. Copy rar and unrar to /bin or /usr/local/bin directory so that you don’t have to enter into the rar directory to run the executable file:
# cp rar unrar /bin
# cp rar unrar /usr/local/bin
Uses of unrar:
Below are common options that are used everyday.
* Open rar (unpack) file in current directory:
$ unrar e file.rar
Here replace file.rar with your actual filename.
* List (l) file inside rar archive:
$ unrar l file.rar
*Extract (x) files with full path:
$ unrar x file.rar
*Test (t) integrity of archive file:
$ unrar t file.rar
Hope these helps.