Create file of certain size
Wish you could create a test file for file-transfer testing? It’s easy with Linux’s (dd) command:
Create 1MB file:
dd if=/dev/zero of=1MB.txt bs=1024 count=1024 |
Create 50MB file:
dd if=/dev/zero of=50MB.txt bs=1024 count=51200 |
Verify the sizes:
ls -lh | grep MB -rw-r--r-- 1 root root 1.0M Dec 23 16:06 1MB.txt -rw-r--r-- 1 root root 50M Dec 23 16:06 50MB.txt |
Leave a Reply
You must be logged in to post a comment.