[lug] file creation of a specific size

Kirk Rafferty kirk at fpcc.net
Wed May 30 15:26:00 MDT 2001


On Wed, May 30, 2001 at 02:13:59PM -0700, Stephen Smith wrote:
> How would I create files (of whichever type) in
> specific sizes?
> 
> For instance, I would like to create a 10mb file
> of nothing.
> 
> Can I do this?


dd if=/dev/zero of=foo count=20000

This creates a file of roughly 10Mb in size, called foo.  Note that by
default, dd uses 512k blocks (hence the "count=20000" arg).

Hope that helps.

-k



More information about the LUG mailing list