Markus Blog What's going on Internet?

25Jun/072

Creating Empty File with Specified Size


If you want to do some download speed test, you can create a dummy file which have specific file size. To create an empty file with size you want type this command:

dd if=/dev/zero of=10mb-file.bin bs=1024k count=10

The command above will create a 10 MB sized file. If you want to create another file with different size, change the number after “count=”. Any number given after “count=” will be multiplied by 1024k or 1MB.

Bookmark and Share

Most Commented Posts

Comments (2) Trackbacks (0)
  1. Hi,

    Thanks for the tip!
    I have a need for either an empty jpg or mp3 of a specific size for testing – I don’t suppose there is a magical, command line thing for this?
    I need file sizes of 250MB, 500MB and 1GB.

    Any help appreciated!

    S.

    • Hi Steven,

      I don’t think there is an automated way to do this. but you can always merge images using image editing (Paint .NET is free) and merge mp3 files using sound editing software (Audacity is open source)


Leave a comment

(required)


*

No trackbacks yet.