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.

May 19th, 2009 at 7:40 pm
Okkkay…. thats a little to less information.
What about extracting only files of a given type or from a file with a list of filenames?
April 1st, 2010 at 6:39 am
Thanks! I was always confused by the password syntax.
July 9th, 2010 at 3:38 pm
good, nice share