Created
February 11, 2018 19:19
-
-
Save ricsiga/5b6ea0b39edb65931b96acb5fc0b00fb to your computer and use it in GitHub Desktop.
create random files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
numberOfDirs=10 | |
numberOfFiles=10 | |
blockSize=100 | |
for d in $(seq 1 $numberOfDirs); do | |
mkdir dir$(printf %03d "$d") | |
for n in $(seq 1 $numberOfFiles); do | |
dd if=/dev/urandom of=dir$(printf %03d "$d")/file$(printf %03d "$n").bin bs=$blockSize count=$((RANDOM + 1024)) 2> /dev/null | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment