Here is a helpful script that we use at Syncplicity for generating files using the command line. We use this to generate dummy content to throw at our sync client to test upload/download. 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.
$ 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
You can download the Bash Script here:
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.