Skip to content

Instantly share code, notes, and snippets.

@encryptio
Created September 2, 2010 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save encryptio/562736 to your computer and use it in GitHub Desktop.
Save encryptio/562736 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
sub spawn {
if ( !fork ) {
system @_ and die;
exit 0;
}
}
spawn "srm -srfv /Users/".quotemeta(scalar getpwuid $>)."/.Trash/*";
for my $dir ( glob "/Volumes/*" ) {
spawn "srm -srfv \Q$dir\E/.Trashes/\Q$>\E/*";
}
1 while -1 != wait;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment