Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, April 20, 2024

File: [Platon] / scripts / perl / large-file / large-file.pl (download)

Revision 1.3, Thu Oct 23 18:11:27 2003 UTC (20 years, 6 months ago) by nepto


Changes since 1.2: +1 -1 lines

Changed $Id for $Platon.

#!/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.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top