Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, I'd like to create some large binary files to test download speeds from my Suse10 server. I know there's a command to do it...but I can't for the life ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2006
    Posts
    4

    Unhappy Command to generate large dummy files


    Hi,
    I'd like to create some large binary files to test download speeds from my Suse10 server. I know there's a command to do it...but I can't for the life of me remember what it is.
    Ideally, I want to create files of 10Mb, 50Mb, 100Mb, 500Mb and 1Gb.

    Can anyone help?

    Thanks!

  2. #2
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,211
    Code:
    cat /dev/urandom > test.bin
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

  3. #3
    Just Joined!
    Join Date
    Apr 2006
    Posts
    4
    Thanks. How do I set the sizes....?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,211
    You can do that a few ways, with:
    /dev/zero (very fast)
    /dev/random
    /dev/urandom (chunks of size you can decide in /proc/sys/kernel/random/pool_size)

    A command like that:
    Code:
    time dd if=/dev/zero of=test.bin bs=1000000000 count=1
    will generate a 1G file (and tell you how much time it took to do so).
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

  6. #5
    Just Joined!
    Join Date
    Apr 2006
    Posts
    4
    Fantastic! Just what I needed. Many thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •