Created
June 10, 2021 13:51
-
-
Save vitalymak/145cbd21a8331327ca2540a219f01eb3 to your computer and use it in GitHub Desktop.
Create random data files | Generate a token
This file contains hidden or 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
# 5 - number of files | |
# bs * count = size of file | |
# bs = sets the blocksize | |
# count = copies only this number of blocks | |
for i in {1..2}; do dd if=/dev/urandom bs=4096 count=500 of=file$i; done | |
# generate a token, simple way: | |
dd if=/dev/urandom count=1 bs=128 | sha512sum | |
# further reading | |
# https://linoxide.com/commands-wipe-disk-linux/ | |
# 1MiB: | |
for i in {1..2}; do dd if=/dev/urandom bs=4096 count=256 of=file$i; done | |
# 500 files for 1 GiB, & measure time | |
time for i in {1..500}; do dd if=/dev/urandom bs=4096 count=262144 of=file$i; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment