I
ioneabu
I have a directory with about 15000 files. About 11000 have .txt
extensions. The files are saved in a directory on an external usb2
hard drive connected to my iBook G4 running OS X 10.4.
I wanted to clear out any files that were not .txt. I ran this script:
#!/usr/bin/perl
use strict;
use warnings;
my $dir = $ARGV[0]; #directory to search under
use File::Find;
find(\&wanted, $dir);
sub wanted
{
unlink if not /\.txt$/
}
Within less than a second, my screen went to a darker shade and a
message appeared telling me that I must turn off my computer by holding
down the power button. I have never seen an OS X computer crash until
now. I repeated the process with the same outcome.
Thanks!
wana
extensions. The files are saved in a directory on an external usb2
hard drive connected to my iBook G4 running OS X 10.4.
I wanted to clear out any files that were not .txt. I ran this script:
#!/usr/bin/perl
use strict;
use warnings;
my $dir = $ARGV[0]; #directory to search under
use File::Find;
find(\&wanted, $dir);
sub wanted
{
unlink if not /\.txt$/
}
Within less than a second, my screen went to a darker shade and a
message appeared telling me that I must turn off my computer by holding
down the power button. I have never seen an OS X computer crash until
now. I repeated the process with the same outcome.
Thanks!
wana