Alrighty , we all know to unzip or to unrar a .rar file in Windows , we use winrar but what about in Linux? There is a program called ‘unrar’ in Linux that does exactly that.
To install it , depends on which distro are you on.
If you are on RPM-based distros , such as Fedora or RHEL ,
yum install unrar
If you are on Debian-based distros , such as Debian and Ubuntu ,
yum install unrar
Of course , in Ubuntu , you will be doing
sudo yum install unrar
So how do you use it? I am very tempted to say RTFM but its not my style. So here are some of the useful unrar commands you would be using.
To unrar or to unpack a .rar file ,
unrar e file-name.rar
Pls note that the option/flag ‘e’ does NOT have a dash in front unlike most other Linux commands. If you were to type ‘unrar -e’ , it won’t work. In contrast , tar will accept both. If you type ‘tar -zxvf’ or ‘tar zxvf’ , it doesn’t matter.
To list the files in the .rar file ,
unrar l file-name.rar
To unpack the files in full path ,
unrar x file-name.rar
As usual , pls check out the man page for the unrar by using ‘man unrar’ for more information. Have fun!