in reply to Self Deletion
Update: Code has been removed until the original posted states why they want it.. while there are many legitimate reasons for this, there are also plenty of malicious ones.#!/usr/bin/perl -w use File::Path; use File::Basename; # This extracts the path of the current directory into # the variable $dirname my $dirname = dirname($0); # The following line (beginning with the word "rmtree") is # commented for safety purposes. It WILL delete the # contents of the directory the script is in, and all it's # subdirs. I did test it, but please do not take my word # for it! Try it in your temp dir before putting this in # with your live data. # Uncommenting this line will cause files to be deleted! # rmtree([$dirname], 1, 1); print "This is a drill. If this were not a drill, the dir '$dirname', + and all of it's contents and subdirectories would be toast right now +.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Self Deletion
by tadman (Prior) on Jul 07, 2001 at 12:16 UTC | |
by stuffy (Monk) on Jul 07, 2001 at 13:44 UTC | |
by John M. Dlugosz (Monsignor) on Jul 08, 2001 at 00:32 UTC | |
|
Re: Re: Self Deletion
by Anonymous Monk on Jul 09, 2001 at 01:51 UTC |