create an big file other then dd

Robert Nichols rnicholsNOSPAM at comcast.net
Wed Apr 19 23:14:00 UTC 2006


Hans Müller wrote:
> Hello is the an faster way then use dd to create an big file??
> The file must only exits. The content of the created one don't care.
> I thing there must be an way only to reserve space on the file system.
> 

To reserve space on the filesystem it is necessary to write to each
block of the file.  To do otherwise (e.g.: create a 1GB file with
"dd if=/dev/zero of=some.file bs=1k seek=1048575 count=1") makes a
sparse file which actually uses only a few blocks in the filesystem
until you write to other locations in the file.

Using 'dd' is as fast a way as any to write the entire file.

-- 
Bob Nichols         Yes, "NOSPAM" is really part of my email address.




More information about the fedora-list mailing list