Skip to content

Instantly share code, notes, and snippets.

@rolfvreijdenberger
Created November 25, 2013 01:05
Show Gist options
  • Save rolfvreijdenberger/7634714 to your computer and use it in GitHub Desktop.
Save rolfvreijdenberger/7634714 to your computer and use it in GitHub Desktop.
fill an existing file filled with a string of choice to the exact filesize the file currently has. using bash and dd
size=`wc -c test.txt | cut -f6 -d" "` && while true; do echo -n "x"; done | dd of=~/test.txt bs=$size count=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment