[comp.unix.questions] Perl sparse file maker

merlyn@iwarp.intel.com (Randal Schwartz) (12/13/89)

In article <242@estinc.UUCP>, fnf@estinc (Fred Fish) writes:
| This is about the 2nd or 3rd posting I've seen with a sample program to
| create sparse files.  You guys are working too hard!  :-)
| 
| Try:
| 
| 	echo "This is a sparse file." | dd of=sparsefile seek=1000 bs=1k

And, if you don't have echo (:-),

perl -e 'seek(STDOUT,2**20,0); print "This is a sparse file.";' >sparsefile

Just another Perl hacker (waiting for comp.lang.perl on my machine),
-- 
/== Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ====\
| on contract to Intel's iWarp project, Hillsboro, Oregon, USA, Sol III  |
| merlyn@iwarp.intel.com ...!uunet!iwarp.intel.com!merlyn	         |
\== Cute Quote: "Welcome to Oregon... Home of the California Raisins!" ==/