Asked • 06/27/19

Quickly create a large file on a Linux system?

How can I **quickly** create a large file on a Linux ([Red Hat Linux][1]) system? [dd][2] will do the job, but reading from `/dev/zero` and writing to the drive can take a long time when you need a file several hundreds of GBs in size for testing... If you need to do that repeatedly, the time really adds up. I don't care about the contents of the file, I just want it to be created quickly. How can this be done? Using a sparse file won't work for this. I need the file to be allocated disk space. [1]: [2]:

1 Expert Answer


Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.