RAR is a proprietary compression format widely used today. It’s supposedly has 30% higher compression rate when compared with WinZip. If you download large torrent then chances are you are are already well acquainted with RAR.
I use RAR on my Windows and Linux boxes everyday and today I’ll show you how to extract RAR files from the Linux command line.
In Linux, to extract a RAR file you would use the unrar command. The unrar binaries are typically not included with the default Linux install so you will have to install them either through the package manager or by downloading binaries from rarlab.com
Let’s get to the HowTo now,
Extract a RAR file into the curren directory.
# unrar e [filename].rar
Extract a RAR file with the full file path.
# unrar x [filename].rar
List contents of a RAR file
# unrar l [filename].rar
Test intergruty of a RAR file
# unrar t [filename].rar
If you face any problems obtaining,installing or using unrar please contact me. I will be glad to help.
Author comments are in a darker gray color for you to easily identify the posts author in the comments
Hi
Thanks for providing unrar command ,i have benn searching for this for the past 2 hours.
vijay
no problem vijay. glad to help
Hi
Can u please provide me site to download WINrar wch should support RedHat Linux(2.6.9)
Regards
vijay
Hi Vijay, have you tried going here?
http://rpm.livna.org/
http://dag.wieers.com/rpm/packages/unrar/
http://ftp.freshrpms.net/pub/freshrpms/redhat/
Hello — I have about 20 parts to a larger file. I am having trouble figuring out how to unrar these files. They are VMWare images and one file could span mulitple rar file. Any help would be great. Thanks, Tom
Please ignore my post. Extracting the first part correctly extracted the other 20 parts.
Thanks,
Tom
Thanx Tom. That was just what I’d been looking for.
Good to hear you got it working Tom
rar: /lib/tls/libc.so.6: version `GLIBC_2.4′ not found (required by rar)
I got the above error when i used ‘rarlinux-3.71.b1.tar.gz’ from the link which you had mentioned.
How do I fix it to extract a rar file in RHLinux
Somesh, your GNU C library needs to be updated.
Goto http://rpm.pbone.net/ and search for “GLIBC_2.4″. You should be able to find a suitable rpm package there.
hi danny,
Thanks for the link, i recently upgraded to rhel 5, and things worked even without the rpm package, maybe it got upgraded in the process.
Just one small correction, i found we need not give the hyphen before the ‘e’ option for unrar’ing the rar file…
Hi Somesh, Good to hear everything is working fine for you now. Thanks for the hyphen update. (I’m so used to using hyphens of options
)
Anyways, hope to hear from you soon and make sure to check back often.
At a GNU bash, version 3.00.16(1)-release (i386-redhat-linux-gnu)
I found that
$ rar e [filename].rar target/
(the e without hyphen) works just as wel.
when i am entering the command unrar e filename.rar some bash command is coming telling bash:unrar:command not found.I am using redhat linux.Please suggest.
Hi Das, I think you don’t have the unrar package installed.
If you go through the comments you will find the download location for the unrar package.
Hope this helps
I know program is working with RAR files in Windows, and possble in Linux-rar fixer, do something tool was specifically developed for extracting information from corrupted archives of the RAR format, works with all variants of this format and can recover data from archives and corrupt rar files with various compression rates and created in different software, it allows you to recover information from corrupt archives and corrupt rar files stored on removable media or on remote computers (tool can fix rar file via the local area network).
rar: /lib/tls/libc.so.6: version `GLIBC_2.4′ not found (required by rar)
I couldn’t fix the library problem, but I found a workaround.
In the distribution is also an executable called “rar_static” simply use that instead of rar…
Cheers, Dolf
Hi Danny
Good to know the command, however I tried to install using yum to get unrar but it says no package available and more ever I found apt-get command is not found in bash shell.
I think u could understand my prob. Now I’d like to get u with solution.
Thanks
Padygen