Creating a file with a specific size
The last week I had to test the transfer speed between two machines. I tested it sending files with different size. For creating those files I used the dd command which allows to create an empty file of desired size.
$ dd if=/dev/zero of=file_to_create bs=1k count=1024
1024+0 records in
1024+0 records out
1048576 bytes transferred in 0.010811 secs (96992910 bytes/sec)
/dev/zero is a special file that provides as many null characters (ASCII NUL, 0x00) as are read from it. In the above example, the bs option set both input and output block size to 1k, and the count option copy only 1024 input blocks, so ...