[netatalk-admins] purging .AppleDouble directories


Subject: [netatalk-admins] purging .AppleDouble directories
From: John Barry -Technician (John.Barry@tees.ac.uk)
Date: Thu Oct 09 1997 - 13:52:36 EDT


Hi,
I've just cleaned out my .AppleDouble directories and it occured to me that
others might like to do the same. So here's how I did it:

%cd
%find . -name .AppleDouble -print >purge-list
%purge_appledouble.pl purge-list

The purge_appledouble.pl script looks like this:

#!/apps/perl5/bin/perl
 
open FILE, $ARGV[0];
while ($line = <FILE>) {
chomp $line;
print "$line\n";
system <<END;
rm -rf $line
END
}

The only thing you might have to change is the first line, which contains the
path to the perl executable. If you wish the program to do anything else for
each directory it deletes, add the command after the 'rm -rf' line.

Doubtless it could be expanded to do multiple users etc. But it took all of 5
mins to write and run, so I'm happy with it.
later
jb



This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:26:55 EST