Removing Files after Successful Extraction unrar rm shopt globstar
0
votes
1
answer
210
views
shopt -s globstar
for f in **/*.rar; do
dir=
dirname "$f"
;
unrar e "$f" "$dir" && rm -frv "${f::-2}*";
done
From echoing out testing the rm command, the file is the correct path. I don't receive any errors about an incorrect path or anything. I know there are other methods to use find, but that would be pointless and use extra cpu cycles this should be working from everything I found. Any ideas on how to use the rm command properly?
Asked by user316523
Jan 8, 2019, 02:29 AM
Last activity: Jan 8, 2019, 04:12 AM
Last activity: Jan 8, 2019, 04:12 AM