Create test files of specific size

Sometimes you need file of an exact site for testing purpose like an email attachment.

Here is how you make them in Linux command line:

dd if=/dev/zero of=file_5Mb.txt bs=1k count=5120
dd if=/dev/zero of=file_7Mb.txt bs=1k count=7168
dd if=/dev/zero of=file_8Mb.txt bs=1k count=8192
dd if=/dev/zero of=file_8.8Mb.txt bs=1k count=9011

Create test files of specific size

dd if=/dev/zero of=file_5Mb.txt bs=1k count=5120
dd if=/dev/zero of=file_7Mb.txt bs=1k count=7168
dd if=/dev/zero of=file_8Mb.txt bs=1k count=8192
dd if=/dev/zero of=file_8.8Mb.txt bs=1k count=9011
dd if=/dev/zero of=file_9Mb.txt bs=1k count=9216

ls ./file_* -lah
-rw-r--r-- 1 rob disk 5,0M feb 20 14:30 ./Desktop/file_5Mb.txt