1833767 Members
2787 Online
110063 Solutions
New Discussion

Big files creation.

 
SOLVED
Go to solution
Simone Benzi_1
Frequent Advisor

Big files creation.

Hello everybody,

How can I create a 1 Gb file in a quick and simple way (hpux 11.00)?

Thanks a lot,

Simone
5 REPLIES 5
Robert-Jan Goossens
Honored Contributor
Solution

Re: Big files creation.

Hi,

# prealloc file 10000000

regards,
Robert-Jan
SIJU JOSE
Frequent Advisor

Re: Big files creation.

Hi Simone

try the following

#prealloc filename sizeinbytes

HTH

SIju Jose
David Child_1
Honored Contributor

Re: Big files creation.

Simone,

You can try 'prealloc':

$ prealloc filename size-in-bytes

Example:

$ prealloc mybigfile 1073741824

David
Mark Grant
Honored Contributor

Re: Big files creation.

While this certainly does this, it gives you a file full of nulls. For most puposes I guess it doesn't make much difference.

However if you want to check compression or encryption speeds or possibly even file transfer speeds using something like "rsync" I'm not sure a file full of nulls is the best way.

One way of generating a large amount of random data is to use "dd" and copy 1GB of swap to some file.
Never preceed any demonstration with anything more predictive than "watch this"
Simone Benzi_1
Frequent Advisor

Re: Big files creation.

Thanks a lot to everybody!