#!/usr/bin/perl -w
#
# large-file.pl
# (c) Pixel <pixel@mandrakesoft.com> [21/8/2002]
#
# create a big file with a hole (works on ext2/ext3/xfs)
# stat on the generated file returns a *big* number
#
# $Platon: $
#
if ($#ARGV != 0) {
print("large-file.pl - create a big file with a hole (works on ext2/ext3)\n");
printf("Usage: %s <filename>\n", $0);
exit 1;
}
sysopen F, $ARGV[0], 64 | 2 or die;
sysseek F, 1 << 31, 1 or die;
sysseek F, 1 << 31, 1 or die;
syswrite F, ' ' or die;
Platon Group <platon@platon.sk> http://platon.sk/
|