dd if=/dev/urandom of=/home/myrandomfile bs=1 count=N openssl enc -aes-256-ctr -pbkdf2 -pass pass:"$(date '+%s')" < /dev/zero | dd of=/home/myrandomfile bs=1M count=1024
Almost all CPUs have AES native instructions so you'll be able to produce pseudorandom junk really fast. Even my old system will produce it at about 3Gb/s. Much faster than urandom can go.Easiest alternative I guess is to pipe through head. It still grumbles, but it does work
openssl enc -aes-256-ctr -pbkdf2 -pass pass:"$(date '+%s')" < /dev/zero | head -c 10M > foo $ sudo truncate --size 1G /emergency-space
$ sudo shred /emergency-space
I find it widely available, even in tiny distros.Most current desktops (smaller than your usual server) won't have any problem with the GP's command. Yours is still better, of course.
head -c 1G /dev/urandom > /home/myrandomfile
And not have to remember dd's bizarre snowflake command syntax.