Wednesday, December 23, 2015

create huge file with random content in bash

Sometimes needed to create huge files with random stuff for penetration tests.

tr -dc A-Za-z0-9 </dev/urandom |dd of=/tmp/test.txt bs=1MB count=49 iflag=fullblock

count=<size-in-MB>