Skip to content

Instantly share code, notes, and snippets.

@csdy
Last active August 29, 2015 14:03
Show Gist options
  • Save csdy/12f7f6711f24ac7fd194 to your computer and use it in GitHub Desktop.
Save csdy/12f7f6711f24ac7fd194 to your computer and use it in GitHub Desktop.
Generate Zero-Filled FIle of SIze
# Generate data file
dd if=/dev/zero of=output.dat bs=1M count=10
# Zip data file (no compression)
zip -0 output.zip output.dat
@csdy
Copy link
Author

csdy commented Jul 31, 2014

count is a multiple of bs. In this context, change count to be however many megabytes you want the filesize to be. Also be sure to change output.zip in the second command to whatever filename you want to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment