How to create a large file for testing purpose ?

Issue :

How can a large file, say 1GB, for some testing purposes be created?

Solution :

Use the following command :

dd if=/dev/zero of= filename bs=1024 count=1024number of 0′s

Replace ‘filename’ with the actual filename.
Replace ‘number of 0′s’ with the required number of 0′s

For example,
One ’0′ for 10MB , two for 100 MB and so on..

For the above scenario (file of size 1GB), use the following command :

dd if=/dev/zero of=file.test bs=1024 count=1024000

Filed Under: Quick fixesTechnical

Tags:

About the Author: InstaCarma is a provider of Enterprise Class Solutions for the Hosting Industry

RSSComments (0)

Trackback URL

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
InstaCarma provides outsourced web hosting technical support, helpdesk management, datacenter automation, cloud service management. Sales - 1800 810 6547 - visit www.instacarma.com