How To Extract RAR Files Under Linux

by lifeLinux on May 30, 2011

RAR stands for Roshal ARchive. It is a proprietary archive file format that supports data compression, error recovery, and file spanning. It was developed by a Russian software engineer, Eugene Roshal (the first letter of his surname contributing to the name of the archive format), and is currently licensed by win.rar GmbH.

The filename extension used by RAR is .rar for the data volume set and .rev for the recovery volume set. In previous versions, if a RAR-archive was broken into many smaller files (a “multi-volume archive”), then the smaller files used the extensions .rar, .r00, .r01, .r02 etc.

Install unrar command

To extract RAR files under Linux system, you need to install unrar command. There are some ways to install unrar command. Under Ubuntu/Debian Linux, type the following command

# apt-get install unrar

If you are using Fedora core Linux then type the following command

# yum install unrar

If any of above, methods is not working, download binary package from official rarlab site, enter

# wget http://www.rarlab.com/rar/rarlinux-4.0.1b1.tar.gz

To Extract rarlinux-4.0.1b1.tar.gz, type the following command

# tar zxvf rarlinux-4.0.1b1.tar.gz

Sample output

rar/
rar/readme.txt
rar/default.sfx
rar/whatsnew.txt
rar/license.txt
rar/order.htm
rar/rar
rar/unrar
rar/rar_static
rar/technote.txt
rar/rarfiles.lst
rar/makefile
rar/rar.txt

Now copy rar and unrar commands to /bin directory, type the following command

# cd rar
# cp rar unrar /bin

How to use unrar

To extract rar file in current directory, type the following command

$ unrar e file.rar

To list file inside rar archive, type the following command

$ unrar l file.rar

To extract file with full path, type the following command

$ unrar x file.rar

To test integrity of archive file, type the following command

$ unrar t file.rar

Related Posts:

{ 1 comment… read it below or add one }

khalid February 15, 2013 at 6:56 am

how to unrar all files to a specific directory e.g. MyDirectory123

Reply

Previous post:

Next post: