Re: remove me
On Mon, 10 Jan 2005 23:07:06 +0100, Christian Perrier
<bubulle@debian.org> wrote:
> Quoting Michelle Konzack (linux4michelle@freenet.de):
> > rm -rf Aalicegore@aol.com >/dev/null
> Nope, you're definitely wrong. The correct command line should be:
>
> cd "call wave" ; rm -f Aalicegore@aol.com >/dev/null
>
> The user explicitely asked for being removed from call wave only.:)
>
> I'm pretty sure other fellow DD's will find nice ways to enhance this
> and correct my poor shell syntax, though.
=)
Removal from all instances would be required:
updatedb
locate "call wave" | grep "Aalicegore\@aol.com" >> possible_call_wave_locations
perl -w removal.pl possible_call_wave_locations
===== cut source ===========
use strict;
use diagnostics;
# must be root...
die "You are not root ... good-bye..." if $<;
# Pass me a file to parse - unless I am NOT root...
my $remove = @ARGV ? $ARGV[0] : 'unknown';
# Exit on error...
die "nothing to parse ..." if ($remove =~ /unknown/i);
# You *could* sort the data ... something like
# my $sorted = `cut -f3 -d: $gf > $us && sort -n $us`;
my $erc = '';
my $test = '';
my $targets = 0;
foreach $test ( (split(/\n/, $removal)) ) {
$erc = system("rm -fR $test") / 256 unless $<;
print "\n\nError Cannot remove you from Call Wave $! $erc" if $erc;
}
__END__
*** modified from:
http://backpan.cpan.org/authors/id/S/SN/SNEEX/addgroup.sx
This is all totally in good fun and completely untested...
Cheers!
--
WC -Sx- Jones
http://insecurity.org/
Reply to: