4 ms·
`cat /dev/urandom > /tmp/myfile` is faster on macos though
by giuscri 4y ago
`cat /dev/urandom > /tmp/myfile` is faster on macos though
- tombert 4y agoI suspect that just doing a `truncate` command is probably even faster. I just like the `yes` version because it requires basically zero thought on my end.
- nacs 4y ago`yes` is far faster on my Linux (2.2GB/s) vs /dev/urandom (0.38GB/s) -- not surprising since the `man` page for urandom says: "[urandom] is designed for security, not speed, and is poorly suited to generating large amounts of random data" `cat /dev/zero` is pretty much as fast as `yes` on my system however (2.1GB/s)