Discussion on:

Message 6 of 7
0 Votes
+ -
Delete entire target directory???????
That shell script will DELETE all contents of the target directory, due to the "rm -rf $2" line. You should either remove that line or tell users that the target directory will be SCOURED COMPLETELY.

So don't use this on your home Documents directory or anything else that's already got files! Very sloppy and dangerous, especially since there's no mention of the possibility of this calamity in the article.

I have no idea of the rest of the script does what it claims, I just stopped reading after the "rm -rf $2" line!
3rd Jul