sh scripting question
John Levine
johnl at iecc.com
Sun Oct 18 21:54:25 UTC 2020
In article <20201018144327254822114 at bob.proulx.com> you write:
>> Since find is in use, I think the canonical solution is
>> to use "find -print0"..."xargs -0"
>Here is an example, I will use a "ls -ld" command just to make it a
>real concrete example and perhaps easier to read that way.
>
> find . -exec ls -ld {} +
Sometimes that's better, sometimes not. I have find scripts that delete
stale files, and it is a lot faster to use xargs to run "rm" once for
each thousand files than once per file.
--
Regards,
John Levine, johnl at taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly
More information about the freebsd-questions
mailing list