Re: [dev] Why not use the -exec feature of find?

2021-06-22 Thread Hadrien Lacour
On Tue, Jun 22, 2021 at 08:26:40AM -0400, Greg Reagle wrote: > All over the place (tutorials, manuals, articles, questions and answers) I > see the advice to use the null feature of find (-print0) and xargs (-0) to be > able to handle any kind of wacky file name (e.g. filenames with newlines).

Re: [dev] Why not use the -exec feature of find?

2021-06-22 Thread Lee Phillips
> Even when you use multiple arguments per command as with > -exec '{}' + > ? It is still spawning a new process for every file match? No, then it will use the maximum number of file arguments allowed by your shell for each process.

Re: [dev] Why not use the -exec feature of find?

2021-06-22 Thread Greg Reagle
On Tue, Jun 22, 2021, at 09:59, Sean MacLennan wrote: > The -exec flag spawns a new process for every file match. Even when you use multiple arguments per command as with -exec '{}' + ? It is still spawning a new process for every file match? > This can be > slow if you have a lot of files.

Re: [dev] Why not use the -exec feature of find?

2021-06-22 Thread Lee Phillips
> All over the place (tutorials, manuals, articles, questions and answers) I > see the advice to use the null feature of find (-print0) and xargs (-0) to be > able to handle any kind of wacky file name (e.g. filenames with newlines). > Granted, *if* you are going to pipe find into xargs, the ad

[dev] Why not use the -exec feature of find?

2021-06-22 Thread Greg Reagle
All over the place (tutorials, manuals, articles, questions and answers) I see the advice to use the null feature of find (-print0) and xargs (-0) to be able to handle any kind of wacky file name (e.g. filenames with newlines). Granted, *if* you are going to pipe find into xargs, the advice mak