[ale] making empty files

Danny Cox danscox at mindspring.com
Fri Mar 21 14:01:03 EST 2003


Jason,

On Tue, 2003-03-18 at 16:38, Jason Vinson wrote:
> i am attempting to make files of various sizes to do transfer tests on 
> my network, and i know there is a command to make an empty file of a 
> specific size.  Can anyone give me a hint?

	Sorry I'm late in this conversation, out of town.

	The best way to make several zero length files at once is 'tee'.  You
can mention several files on the command line, and it'll make 'em all at
once.  I saw this usage in a mklost+found command from years back....

	To make several files of NULs of a specific size, you might try split
with the --bytes option.  It'll make xaa, xab, xac, etc. until you run
out of data (or disk, watch out! ;-).

	So, something like:

	dd if=/dev/zero bs=20M count=2000 | split --bytes=20m

would get you 2000 files of 20MB size full of NULs.

Cheers!

-- 
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.

Danny

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list