The unrar command for Linux takes care of opening rar files.
Firstly, install the command with the yum install unrar command.
[root@localhost Downloads]# yum install unrar |
Or this way on a Debian GNU/Linux system.
[user@debian ~]$ sudo apt-get install unrar |
Then you may unpack your rar files and maintain the directory structure if there is one inside the file.
[homer@localhost Downloads]$ unrar x myfile.rar |
That is how easy this is!
7zip is another tool that can be used to unrar the rar archives.
apt-get install p7zip-rar 7z e archive.rar