How to create a large file for testing purpose ?
admin | Feb 15, 2010 | Comments 0
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 fixes • Technical
About the Author: InstaCarma is a provider of Enterprise Class Solutions for the Hosting Industry

1800 810 6547