Re: how to ask grep to search specific file recurisively?

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

 



On Sun, 2008-11-02 at 00:01 +0530, Vimal wrote:
> > Actually, it's more like
> >
> > while stdin not empty:
> >  args_list = []
> >  while arg_list < maximum length:
> >     push a line from stdin into arg_list
> >  invoke program with arg_list
> 
> Ah, thanks for clearing few things! :-) Is this why xargs is more efficient?

Yes, avoids calling fork() so much.

> For others who might be reading this, find also has a similar option.
> From it's manpage:
> 
>     -exec utility [argument ...] {} +
>        Same as -exec, except that ``{}'' is replaced with as many pathnames as
>        possible for each invocation of utility. This behaviour is similar to
>        that of xargs(1).

Good to know.


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux