R-Ts NetWorks

Server the Best

How to create a large file for testing purpose ?


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

Advertisements

October 13, 2012 - Posted by | Linux

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: