text data or binary?
For a text file: Use SED to replace every character with something.
Text or binary: If you know the size of the file, then use dd to write all zeros to it.
example: Write all zeros to the file "mystuff":
filesize=$(stat -c %s mystuff)
dd if=/dev/zero of=mystuff bs=1 count=$filesize