Quantcast
Channel: User Kamil Maciorowski - Super User
Viewing all articles
Browse latest Browse all 670

Comment by Kamil Maciorowski on can dd be used to wipe clean a directory?

$
0
0
-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.

Viewing all articles
Browse latest Browse all 670

Trending Articles