More often than not, we need a tool that helps create “given number of file” and “given size of files” in a “given directory” on a file storage or a filesystem. I need it in many POC with Spectrum Scale. So here is a quick basic script that helps you do that.
Get it from:

./ Script to create N files of x size Usage: ./nfiles example: ./nfiles /tmp 100 1M Running the same directory will overwrite the existing files in that directory. The tool create files starting with ‘file’ as the filename , example: file1, file2,

Note: this utility is a script and is using /dev/urandom so the performance and time creation will be likewise. It should not be used performance benchmarking but more for capacity creation required for tests.

Ack: Thx to Tomer Perry for his review.

sandeep n chetan

Join The Discussion

Your email address will not be published. Required fields are marked *