web analytics


rar and unrar archives in linux

Tags: .rararchivesunrar

Published on: July 12, 2009 by Vijesh Vijayan

rar and unrar archives in linux


Rar archived files are very common these days and in linux administration we have to find a solution for rar file extraction and compression in linux. To extract rar files we have the unrar application.

To use unrar to extract use the following commands:
unrar e <filename.rar> use this to unpack the rar file in current directory
unrar l <filename.rar> use this to list the files inside the archive
unrar x <filename.rar> use this to extract the files with the full path
unrar t <filename.rar> use this to test the integrity of archive

Now for those who wish to compress files into the rar archived format, we have the rar application and the following commands will come in handy:

rar a <desired filename.rar> <path of directory to archieve> use this to create a normal compressed rar archieve
rar a <desired filename.rar> <path to file1> <path to file2> <path to file3> … use this more multiple individual files to be archived into a sigle rar file.
rar a -p<password> <desired filename.rar> <path to dir or file> use this to password protect the rar files
rar a -m<level of compression 1-least 5-best> -v<size of each rar file> <desired filename.rar><path to dir or file> use this to split the file to a number of rar archived files of desired size.

Now to get all this and install the rar and unrar application, proceed with the following commands:

wget http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz
tar -zxvf rarlinux-3.6.0.tar.gz
cd rar
cp rar unrar /bin

For any further help, do contact our Linux administration team

Category : Howtos, Linux, Snippets, Training

Vijesh Vijayan

Vijesh Vijayan

Vijesh is quite enthusiastic in learning new technologies and enjoys sharing it with others. He has great command over various scripting languages like bash, perl, python and is keen in developing scripts for better productivity. He is a gifted singer and amuses the team with his mimicry skills, when there is a leisure moment.

You may also read:


Add new commentSIGN IN

Let's Connect

Get new updates


$0.000 items