Update 'wipe.pl'
Added conditional to limit IO to terminal for progress output.
This commit is contained in:
parent
69b9947f58
commit
3110fcd761
6
wipe.pl
6
wipe.pl
@ -5,6 +5,8 @@ use Digest::MD5 "md5_base64";
|
|||||||
use POSIX;
|
use POSIX;
|
||||||
use v5.10;
|
use v5.10;
|
||||||
|
|
||||||
|
$| = 0; #turn off IO buffering
|
||||||
|
|
||||||
# set CONFIRMATION_PHRASE to anything falsy (like zero) if you are a fast and
|
# set CONFIRMATION_PHRASE to anything falsy (like zero) if you are a fast and
|
||||||
# loose badass and you don't need no stinkin' safety net.
|
# loose badass and you don't need no stinkin' safety net.
|
||||||
use constant CONFIRMATION_PHRASE => "YES";
|
use constant CONFIRMATION_PHRASE => "YES";
|
||||||
@ -150,7 +152,9 @@ sub wipethemdrives {
|
|||||||
seek($longdiskw,0,0);
|
seek($longdiskw,0,0);
|
||||||
until (eof $longdiskw) {
|
until (eof $longdiskw) {
|
||||||
print $longdiskw "\0";
|
print $longdiskw "\0";
|
||||||
printf(" %5.5s%%\r\r\r\r\r\r\r", sprintf("%.2f", (tell($longdiskw)/$totalBytes)) );
|
if ( !(tell($lingdiskw) % ($totoalBytes / 1000) ) {
|
||||||
|
printf(" %5.5s%%\r\r\r\r\r\r\r", sprintf("%.2f", (tell($longdiskw)/$totalBytes)) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user