Ensure I am a in specific folder before calling rm
-3
votes
3
answers
118
views
in my bash script, I have some very danger lines like :
rm -r *
if it is mis-run in some folder, it would be very disastrous.Basically, I would need to add an if condition to make this does not trigger unless I am a folder call
blah_pew_blah
, in that case the damage done is probably minimal... But how do I check it? Thank you.
Asked by user40780
(1981 rep)
Apr 4, 2017, 07:35 AM
Last activity: Apr 4, 2017, 10:54 AM
Last activity: Apr 4, 2017, 10:54 AM