The following command works for unrar
to extract an archive to a certain folder.
unrar e -r -o- /home/username/source/directory/*.rar /home/username/copy/extracted/to
Inside /home/username/source/directory
there are some subdirectories with .rar
archives and some other files (.r01
, .r02
, ...). I want to extract the .rar
files to /home/username/copy/extracted/to
and delete the /home/username/source/directory
folder or all the files in that one folder.
In the above command, where should I put the delete command when the extracting is done?