[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SAGE] LDAP Migration Question




<quote who="Brandon S. Allbery KF8NH">
>
> On Jul 2, 2007, at 14:15 , Brad Knowles wrote:
>
>> On 7/2/07, Nick Stoughton wrote:
>>
>>>  If your find is POSIX conforming, then you can do
>>>
>>>  find / -owner $old_uid -exec chown $2 {} +
>>
>> Now we not only get to nuke people for excessive unnecessary use of
>> "cat", now we can whack them for unnecessary use of xargs....
>
> xargs still wins, because -exec does a fork/exec for each file while
> xargs does them in batches.

>From the GNU find man page:

-exec command {} +
  This variant of the -exec option runs the specified command on the
  selected files, but the command line is built by appending each
  selected file name at the end; the total number of invocations of
  the command will be much less than the number of matched files.
  The command line is built in much the same way that xargs builds
  its command lines.  Only one instance of '{}' is allowed within
  the command.  The command is executed in the starting directory.


-- 
And, did Galoka think the Ulus were too ugly to save?
                                         -Centauri