rar and unrar — rar compression and decompression tools 
Here are some useful examples of rar and unrar usage under Linux shell. To create a rar archive archive.rar containing directory called dir use the following command.
rar a archive.rar dir/
To create a rar archive archive.rar containing files file1.dat, file2.dat, file3.dat use:
rar a archive.rar file1.dat file2.dat file3.dat
or, more general:
rar a archive.rar file?.dat rar a archive.rar *.*
To create a password protected rar archive archive.rar with password set to password use:
rar a -ppassword archive.rar dir/
To create a password protected rar archive archive.rar with password set to password,
where even file lists are encrypted use:
rar a -hppassword archive.rar dir/
To extract rar archive archive.rar use:
unrar e archive.rar
To find and extract all rar archives in . path and redirect outputs to unrar.log log file use:
find . -name '*.rar' -print0 | xargs -I{} -0 -n 1 unrar e -y '{}' >unrar.log 2>&1
Did you find the above information useful and interesting? If so, please support this site by using the blog directory links at the bottom of this page. Thanks for your support!
If you have any Linux related problems or questions then please feel free to post them on our Linux Forums: http://linux.dsplabs.com.au/forums.
