Create dummy file on freebsd
Posted 1 year, 1 month ago at 3:26 pm. 1 comment
dd if=/dev/random of=test bs=1m count=2
dd if=/dev/urandom of=test bs=1m count=2
(thanks simon!)
This will create 2.0M file called “test”.
[root@bentley ~]# ls -alh test -rw-r--r-- 1 root wheel 2.0M Jun 4 15:20 test [root@bentley ~]#
This also works on linux, but he doesn’t understand “m” as unit.
I’m affraid /dev/random will be very slow for creating large files or benchmarking.
/dev/urandom is the choice to go with.