Last active
December 14, 2022 13:40
-
-
Save eric-glb/2558082e403a88f47ab86f26351ce1c8 to your computer and use it in GitHub Desktop.
Generate quickly 20GB of random data using openssl
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
#!/usr/bin/env bash | |
# Generate 20GB file of random data in /dev/shm (~ramdisk) | |
time openssl enc -aes-256-ctr \ | |
-pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" \ | |
-nosalt < /dev/zero 2>/dev/null | | |
dd bs=4M \ | |
count=5120 \ | |
status=progress \ | |
iflag=fullblock \ | |
of=/dev/shm/my_random_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In a 6C/12T VM in Azure, 112GB RAM: