Script to generate files
Utility to generate placeholder content.
The script takes in some simple arguments and then generates a folder structure and randomizes the size of the files outputted to simulate user generated content. This can be helpful when testing performance of desktop sync applications.
$ bash generatefiles.sh 2 2 3 1024
The above command would indicate:
- 2 levels deep
- 2 folders
- 3 files
- 1KB max size
- 0byte min size
An example of the output:
$ bash generatefiles.sh 2 2 3 1024 Generates 2 level deep with 2 folders in each level. Each folder has 3 files that are between 0bytes and 1KB $ bash generatefiles.sh 0 1 1 1024 2048 Generates only one file in the root fold. The file size is between 1KB and 2KB. $ bash generatefiles.sh 0 1 1 2048 2048 Generates only one file in the root fold. The file that exactly 2KB big.