Skip to content

Instantly share code, notes, and snippets.

@benhosmer
Created April 3, 2013 19:55
Show Gist options
  • Save benhosmer/5304676 to your computer and use it in GitHub Desktop.
Save benhosmer/5304676 to your computer and use it in GitHub Desktop.
Using dd to create a file of a certain size.
# Generate a file of a specified size
# Use if=/dev/urandom for random stuff in the file
# This creates a file that is 3mb seek=$[1024*x] where x is the size in MB's you want it to be.
dd if=/dev/zero of=3mbfile.png bs=1024 count=0 seek=$[1024*3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment