$ ./guess_the_languageLinux CLI
Linux CLI · medium · #24

Why use -print0 with xargs -0 instead of a plain pipe?

find . -name '*.bak' -print0 | xargs -0 rm
  1. Names with spaces stay intact
  2. It deletes the files in parallel
  3. It skips hidden backup files
  4. It asks before each deletion
Null-separated names cannot be split on spaces or newlines, so my file.bak reaches rm as one argument.
Play Linux CLI ▸