in reply to Re: Removing Directory and Contents with Perl
in thread Removing Directory and Contents with Perl

I would put some strict testing around an "rm -rf" command, especially if you're running this script as root/Admin. We recently lost several TB of data because a script didn't set the directory variables correctly and ran "rm -rf /*" (instead of "rm -rf $path_to_home/*") as root.

  • Comment on Re^2: Removing Directory and Contents with Perl