in reply to Re: system and &>/dev/null
in thread system and &>/dev/null
Doesn't seem to create a sparse file:
[tmp]$ cat broomduster.pl open my $fh, '>', 'zeros' or die "error opening fh: ($!)"; binmode $fh; print $fh pack "x".(1024*1024*10); [tmp]$ rm zeros; perl broomduster.pl; ls -lh zeros; du -h zeros -rw-rw-r-- 1 duelafn 10M 2008-10-09 22:17 zeros 11M zeros
However, the following works:
[tmp]$ cat duelafn.pl open my $fh, '>', 'zeros' or die "error opening fh: ($!)"; seek $fh, 1024*1024*10 - 1, 0; print $fh "\0"; [tmp]$ rm zeros; perl duelafn.pl; ls -lh zeros; du -h zeros -rw-rw-r-- 1 duelafn 10M 2008-10-09 22:17 zeros 12K zeros
Good Day,
Dean
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: system and &>/dev/null
by mscharrer (Hermit) on Oct 10, 2008 at 07:14 UTC | |
by repellent (Priest) on Oct 10, 2008 at 18:02 UTC | |
by Fletch (Bishop) on Oct 10, 2008 at 18:34 UTC | |
by repellent (Priest) on Oct 10, 2008 at 21:28 UTC | |
by mscharrer (Hermit) on Oct 11, 2008 at 09:30 UTC |