I want to create a large file ~10G filled with zeros and random values. I have tried using:
dd if=/dev/urandom of=10Gfile bs=5G count=10
It creates a file of about 2Gb and exits with a exit status '0'. I fail to understand why?
I also tried creating file using:
head -c 10G </dev/urandom >myfile
It takes about 28-30 mins to create it. But I want it created faster. Anyone has a solution?
Also i wish to create multiple files with same (pseudo) random pattern for comparison. Does anyone know a way to do that?
dd
due to the block size. You might want to look at this post stackoverflow.com/questions/6161823/… it has some good answers how to calculate best block size, as well as some user scripts/programs, and other suggestions usingdd
.