logoalt Hacker News

ape4today at 1:49 PM2 repliesview on HN

If I recall correctly:

    dd if=/dev/urandom of=/home/myrandomfile bs=1 count=N

Replies

Twirrimtoday at 5:09 PM

If you want to do it really quickly

    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.
show 1 reply
fragmedetoday at 4:05 PM

bs=1 is a recipe for waiting far longer than you have to because of the overhead of the system calls. Better bs=N count=1

show 2 replies