-1. While not quoting the variable, not using
IFS= read -r
and piping from find
to while read
in the first place are bugs that will make the code fail for some pathnames (but they may also make the code fail big-time: wipe another file in case of extremely unfortunate pathname containing a newline!), bs=1k count=1024
directly defeats the purpose. With these operands dd
will wipe at most 1 MiB of each file. The answer only appears decent, it is buggy and potentially dangerous.