sometimes it is required to generate a lot of test data

vim /scripts/copy_x_times.sh

#!/bin/bash
# copy given file x times
# usage: copy filename.jpg a 100 times
# ./copy_x_times.sh filename.jpg 100
for ((i=1; i<=$2; i++)) do cp -v "$1" "$1-$i"; done;

/scripts/copy_x_times.sh "very-large-image.jpg" 100

# how much test data was generated?
du -hs .
3.7G	.

# generate checksums
sha512sum * > sha512sums

now do something with this test data

and later

to check if all data is still intact, simply run

sha512sum -c sha512sums
very-large-image.jpg-45 ok
very-large-image.jpg-55 ok
very-large-image.jpg-56 ok
...

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin