macfidelity

|

rethinking the think-different thing

mac | How to create files with a specific filesize

May 3rd, 2009 at 0:05

20090503_terminal_testfiles_01

Sometimes you need files with a specific filesize for testing issues – not that hard if you are able to work with your terminal

The Terminal in Mac OS X is located in

/Applications/Utilities/Terminal.app

The command you need to create files in Terminal is

mkfile

So if you need a quick overview about mkfile just enter

man mkfile

in Terminal.app.

20090503_terminal_testfiles_02

So lets assume we need a file with the size of 10 MB

20090503_terminal_testfiles_03

Let’s check the result

20090503_terminal_testfiles_04

Some additional notes

If you want some additional output while creating the file you could use the verbose parameter -v

20090503_terminal_testfiles_05

Linux users might prefer dd

Tags: , , ,

2 Responses to “mac | How to create files with a specific filesize”

  1. makomi Says:

    Danke, das kann man bestimmt mal irgendwann brauchen. Eine Möglichkeit wäre vll den Datendurchsatz einer Netzwerkverbindung zu testen – gibt es da ne Möglichkeit das bei OSX mit Boardmitteln zu machen?

    ReplyReply
  2. fidel Says:

    hi,

    ich greif da gerne auf iftop zurück – was letzlich via macports installierbar ist.
    Infos zu iftop gibt’s da: http://www.ex-parrot.com/pdw/iftop/

    Den reinen Durchsatz mit Boardmitteln prüfen … .mh Im Activity Monitor wird der Durchsatz angezeigt, ist aber sicherlich keine elegante Lösung.

    ansonsten greifen viele für reine Darstellung des Durchsatzes und ähnlicher Infos auch auf istatsMenus zurück …. ist aber halt auch nicht ab Werk dabei.

    Gruss
    fidel

    ReplyReply

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>