Mahen 0 Junior Poster

Hello all,

I have been working with Linux a lot and i find myself installing a lot of linux distros, but with no way to test them.....

So i crafted a script in Perl to quickly create a lot of files on the Hard Disk and delete them. The script will count the number of milliseconds it took from start till deletion of all the files....

For example, on my home pc, with IDE Drives, it took ~800ms, on my laptop (SATA) ~200ms and on an old pentium 1.4ghz, fresh install - ~400ms

use Time::HiRes qw[gettimeofday tv_interval];
use File::Path;
if (-e "test")
{
 system("rm -rf test");
}
$timedata = [gettimeofday()];
mkdir "test" or die $!;
chdir "test" or die $!;
my $num = 1;
while ($num != 6000)
{
 $num = $num + 1;
 open FILE, ">", "$num.txt" or die $!;
}
system("rm -rf test");
my $duration = tv_interval($timedata) * 1000;
print "$duration  Milliseconds";
print "\n";

any comments are mostly welcomed!