Bash script to unrar files to specific folder


I had a problem with files being compressed with rar where stored on my filesystem. I wanted to automatize the uncompressing of those files and put them in a specific folder. I also wanted to have this done every X hours, so I added the bash script into my crontab.

The basic setup of the script was to specify a folder to search for rar-files,  loop through sub-folders and extract the files to a specific folder.
If the extracted file already exist in the target dir, or a sub-folder. Skip the extraction and move to next one. Pretty simple!

Comments

comments