3 ms·
Yes, I know that, but it's also exceedingly rare for a filename to contain a newline and using -exec is extremely inefficient. I also wrote that on my iPad. Typ
by js2 3y ago
Yes, I know that, but it's also exceedingly rare for a filename to contain a newline and using -exec is extremely inefficient. I also wrote that on my iPad. Typically I'd use a combination of -print0 and xargs -0 for anything more formal than a one-liner on the command line.
The larger bug in my example is that it fails if any of the directories in the path contain a "." in their name!
- eviks 3y ago[flagged]
- js2 3y agoIt's one example. I didn't realize the mistake when I wrote it. I wrote my comment in good faith. What's with the interrogation?
- queuebert 3y agoxargs also is good to use on big argument lists because it can parallelize the processing of arguments with the '-n' and '-P' flags.