diff --git a/wipe.pl b/wipe.pl index 38d1e27..f926c88 100755 --- a/wipe.pl +++ b/wipe.pl @@ -149,10 +149,10 @@ sub wipethemdrives { seek($longdiskw,0,2); my $totalBytes = tell($longdiskw); seek($longdiskw,0,0); - for (0..$totalBytes) { - print $longdiskw "\0"; - if ( !(tell($longdiskw) % ($totalBytes / 1000)) ) { - printf(" %5.5s%%\r\r\r\r\r\r\r", sprintf("%.2f", (tell($longdiskw)/$totalBytes)) ); + for (0..($totalBytes/4096)) { + print $longdiskw "\0"x4096; + if ( !(tell($longdiskw) % (16*4096)) ) { + printf(" %5.5s%%\r", sprintf("%.2f", (tell($longdiskw)/$totalBytes)) ); } } }