-print0participate in the conditions as a true value while they update a flag that sets the eventual output format.
They don’t, in fact, participate. find accepts them with
-print0 -a «expr»syntax just to mess with you, and outputs the filename as soon as it sees the
-print0option. That means these two commands are equivalent:
And in fact, if you offer multiple
find . -print0 -a «expr»
find . -print0
I was intending to do CRLF→LF translations only on text files, and the extension-matching came after the
findemitted no warning, I only noticed the damage when I deployed the website and looked at Firefox valiantly trying to make sense of all the broken images.
The correct way to write the command is actually:
This triggers the
find . «expr» -print0
-print0“option” only once the complete expression has matched. And suppresses the regular/default