I am interested in creating a fixed size file (~25M) with random data. I am currently considering copying data from /dev/urandom into my file.
I am familiar with the following method of copying a file (first seen in a @JLBorges post). I love the efficiency and the fact that no intermediate buffer needs to be created.
How can I modify this code to only copy X bytes into the new file?
Is there a better way to do what I’m trying to do?
You must be logged in to reply to this topic.