Re:OpenBSD now enforcing no invalid NUL characters in shell ...
by amiga386 on Wednesday September 25, 2024 @12:36PM
(#41649206)
Personally I skip the middleman when I can with "find ... -exec cmd {} +"
Or even minimise arguments by including a test if the chmod is even needed:
I actually have a script that fixes up permissions, and I was delighted to fit it in a single find invocation which only performs a single stat() on each file in the traversal, and only executes chown/chmod at all for files that need change:
But if you need multiple transformations of filenames in a pipeline like in your second example, then yes xargs will be involved.
[ Parent
| on HN ]
There are no comments on this comment yet.