Create many files of random size

I am not sure why you would want to use a command like this but I am sure there is some reason for it, so here ya go;

 $ for i in $(seq 1 1000); do let "size = ($RANDOM/100)"; dd if=/dev/urandom \ of=file-$i count=$size 2>/dev/null;done

Maybe if you want to prank your cubemate or something by adding 1000 files to his desktop, it would be useful. Be creative. Let me know the best use for this.

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.