How-to Create a 1M file

Gontran plug-discuss@lists.PLUG.phoenix.az.us
Thu, 10 May 2001 11:14:42 -0700


* Gontran (gontran@gontran.net) wrote:
> * Gilbert T. Gutierrez, Jr. (plug@phxinternet.net) wrote:
> > I need to create a junk file that is precisely 1MB.  How would I go about
> > doing that?
> > 
> 
> Gilbert,
> 
> dd is your what you're looking for I think,, something like 
> 
> 	% dd if=/dev/random of=/my/file.junk count=1000000
> 
> Maybe dev/random is not such a good choice, and also  look into the
> size arguments too (ibs=, obs=), something as a factor of 1024 would 
> probably be nice.  Make sure 1000000 is a Mr.   
> 
> th,
> Gontran