Categories
General

Handy Tidbits: Create lots of files on linux quickly for testing

dd bs=1000000 count=20475 if=/dev/zero | split -b 4095 -a 7 -d – foo.

foo. (filename), 4095 = filesize (in bytes).

Taken from a comment by klode at
http://www.askdavetaylor.com/how_can_i_quickly_create_millions_of_tiny_files_in_linux.html#eb8sC3UpjoMBX0U1.99