split file into thousands of pieces

 

Multiply the total number of files times the size (in bytes). For example: If you want to create 10000 files that are 10 bytes each, do 10000 * 10 = 1,000,000. This represents the size of the master file that is needed.

dd if=/dev/zero of=testfike bs=1 count=1000000

split -b 10 -a 10 testfile

The -b option specifies the size in bytes of each file. The -a option defines the length of the filename of the new files +1 (-a 10 means create a 11 character long filename)

Leave a Reply

Your email address will not be published. Required fields are marked *