To test the speed of data transfer/receipt between two servers, you do not need to search for a large file, you can simply create it within five to ten seconds.
There are several ways to create a file of a certain size using different utilities. For example let’s create two test files with a size of 10MB, using the most popular utilities “fallocate” and “truncate”.
Fallocate is used to manipulate the allocated disk space for a file in order to free or pre-allocate it. The command to create a file would be “fallocate -l 10M test_file.txt”.
Truncate is used to reduce or expand a file to a specified size. To create a 10MB file, we will use the command “truncate -s 10MB test_file_2.txt”. Use the command “ls -l” to check the specified file size.
It is acceptable to specify the size with the notation:
- KB – KiB – K
- MB – MiB – M
- GB – GiB – G
- TB – TiB – T
- PB – PiB – P
- ZB – ZiB – Z
- YB – YiB – Y