Created
January 2, 2018 23:29
-
-
Save leozc/041491c0dcb0e38ab5f35d194385d7f1 to your computer and use it in GitHub Desktop.
Generate random ASCII file and add to git
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
TIME=time | |
for (( i=1; i<=10000000; i++)) | |
do | |
filename=`cat /dev/urandom | env LC_CTYPE=C tr -cd 'a-f0-9' | head -c 32` | |
folder=`cat /dev/urandom | env LC_CTYPE=C tr -cd 'a-f0-9' | head -c 2` | |
mkdir -p $folder | |
base64 /dev/urandom | head -c 102400 > $folder/$filename.txt | |
git add $folder/$filename.txt | |
$TIME -o stat.txt -a -f "%U|%S" git commit . -m"for $filename.txt" | |
echo $i | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment