cat /dev/urandomTo generate and write random data to a file, use the following command:
cat /dev/urandom > randfileTo limit the output, Ctrl+C the process, or use a sleep followed by kill. For example:
(cat /dev/urandom > randfile &); sleep 5; killall catThe command sequence above will write random data to randfile for five seconds. The actual amount of data written will vary.