Sunday, 21 April 2013

Create File of a Given Size

To create a file of a given size such as 10M, use the below command in linux,

dd if=/dev/zero of=test.dat bs=1M count=10

you can use K/M/G as extension for bs.



To create a file of a given size such as 10M with random contents,

dd if=/dev/urandom of=test.dat bs=1M count=10

No comments:

Post a Comment