blob: 3ae325eb4658f33d12b95d259c308dc788931f3d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/usr/bin/perl -w
use strict;
use warnings;
use constant FLOPPYSIZE => 1440 * 1024;
while ( my $filename = shift ) {
die "$filename is not a file\n" unless -f $filename;
die "$filename is too large\n" unless ( -s $filename <= FLOPPYSIZE );
truncate $filename, FLOPPYSIZE or die "Could not truncate: $!\n";
}
|