Thursday, August 14, 2014

Generate a random file with fixed size

using 'dd'

#2M
dd if=/dev/urandom of=a.log bs=2097152 count=1

#102M
dd if=/dev/urandom of=a.log bs=106954752 count=1


See
http://linuxcommando.blogspot.com/2008/06/create-file-of-given-size-with-random.html

No comments:

Post a Comment