Last active
September 24, 2021 08:21
-
-
Save rosuH/b48c3da975adbc7fd2dd8e5bbfd04ec9 to your computer and use it in GitHub Desktop.
An simple script to fill your disk with random file.
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 | |
for i in {1..7} | |
do | |
for i in {1..100} | |
do | |
openssl rand -out "$i.random" -base64 2147483647 | |
if [ $? -ne 0 ]; then | |
echo "Disk full, do clean" | |
rm -rf *.random | |
break; | |
fi | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment