Does anyone have a simple shell script or c program to generate random files of a set size with random content under linux?
How about:
head -c SIZE /dev/random > file
openssl rand
can be used to generate random bytes.
The command is below:
openssl rand [bytes] -out [filename]
For example,openssl rand 2048 -out aaa
will generate a file named aaa
containing 2048 random bytes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With