There may be occasions when you want to test the throughput rates for a large file. In our case, we wanted to use files of certain sizes to accomplish these tests. I suggested using the mkfile command to create the predetermined file sizes.
Here's what was done.
Create a 1MB file
# mkfile 1m 1MB
Create a 5MB file
# mkfile 5m 5MB
Create 10MB file
# mkfile 10m 10MB
Create 100MB file
# mkfile 100m 100MB
Create 1GB file
# mkfile 1000m 1GB
Extra: Use Z Shell brace expansion to create multiple test files
This blog covers Unix system administration HOWTO tips for using inline for loops, find command, Unix scripting, configuration, SQL, various Unix-based tools, and command line interface syntax. The Unix OS supports tasks such as running hardware, device drivers, peripherals and third party applications. Share tips/comments. Read the comments. But most importantly: Read Disclaimer - Read Disclaimer.
Subscribe to:
Post Comments (Atom)
2 comments:
Don't want to be picky but 1GB is 1024MB.
If mkfile is not available (as is the case on some Linux boxes), use dd:
$ dd if=/dev/urandom of=yourfilename bs=1M count=100
Post a Comment