![]() The -b option specifies the size in bytes of each file. ![]() Now that the master file is created, you can now use this to generate the desired 10,000 files that are 10 bytes each.To split the master file into thousands of pieces If you would like it to contain random binary data, use /dev/urandom The above command will create a 1 MB file called ‘masterfile’.To create this master file, run the command:ĭd if=/dev/zero of=masterfile bs=1 count=1000000.This represents the size of the master file that is needed. For example: If you want to create 10000 files that are 10 bytes each, do 10000 * 10 = 1,000,000. Multiply the total number of files times the size (in bytes).Determine the number of files and the size of each file that you require.Second, splitting this master file into the total number of files that you require. First, is creating a single master file that contains the data that the thousands/millions files are based on. There are two parts to creating these files. Do you need an ultra fast way to create a large number of files in Linux? Perhaps, you are doing some load testing for an application and you need to create 1000 or even 1,000,000 files in the matter of seconds.
0 Comments
Leave a Reply. |