Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I need to create a test/junk file to benchmark the performance of a tape drive, but apparently I didn't install mkfile by default so is there any alternative? (Assume that even though I'm asking this question on the internet, I can't access the internet on Red Hat, so I'd like a built-in solution.)
for a benchmark file it might be better to use /dev/random as a source just to get around any optimization that might be happening through compression while trenfering the file (just a thought dont know what you wnat to do excatly)
for a benchmark file it might be better to use /dev/random as a source just to get around any optimization that might be happening through compression while trenfering the file (just a thought dont know what you wnat to do excatly)
Code:
dd if=/dev/random of=./test bs=1024 count=2000000
Using /dev/random to create a 2GB file would take a year! /dev/random uses mouse input etc. as input to generate random numbers, and thus doesn't contain much data. It would be better to use /dev/urandom, which generates pseudo random data. However, this would still take a lot longer as generating the pseudo random data is processor intensive.
Mmmm - all random number generators need seeding. That's not the problem with /dev/random, but the fact that it blocks. /dev/urandom is a indeed better option, since it doesn't block - *if* the data really needs to be random.
Of more concern when I have done this sort of thing is whether the data needs to be a of a particular structure - say 20 chars followed by 8 digits, followed by ...
I tend to generate a small file, then copy (append) the file back and forth; fibonacci growth, and quickly gets to the required size. Simple shell script handles things.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.