Flipkart

Tuesday, August 24, 2010

Installing rar and unrar programs in Linux or Unix

Under Debian Linux, you can use the same apt-get method as follows to install unrar program:

$ apt-get install unrar


If you are using Fedora core Linux then use yum command as follows:

$ yum install unrar


If you are using FreeBSD, you can use:

$ pkg_add -v -r unrar


If any of above, methods is not working, you can download binary package from official rarlab site and choose the right package for your machine... for example, i chose the latest (by the time i write this post):

$ cd /tmp
$ wget http://www.rarlab.com/rar/rarlinux-3.7.1.tar.gz


then untar the file:

$ tar -zxvf rarlinux-3.7.1.tar.gz


Both rar and unrar commands are located in rar sub-directory. Just go to rar directory:

$ cd rar
$ ./unrar


Now copy rar and unrar to /bin directory:

$ cp rar unrar /bin


Then you can use the same method on creating and extracting rar files in linux in my previous post.

Another thing to add, you can also test the integrity of archive, with this command:

$ unrar t filename.rar


or list the files inside the rar file using this command:

$ unrar l filename.rar

No comments:

Post a Comment