home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] is "xargs" really still useful just for limiting command line size?

  • Subject: Re: [OCLUG-Tech] is "xargs" really still useful just for limiting command line size?
  • From: "Robert P. J. Day" <rpjday [ at ] crashcourse [ dot ] ca>
  • Date: Fri, 16 Mar 2018 11:15:27 -0400 (EDT)
On Fri, 16 Mar 2018, Michael P. Soulier wrote:

> On 16/03/18 Robert P. J. Day said:
>
> >   again, as i mentioned, i do understand the value of xargs
> > because of the plethora of useful "tricks" like the above, but
> > those features aside, the basic question is still, does xargs
> > still have value *solely* for its ability to run commands in
> > bite-size pieces?
>
> Yes. All commands have limited input buffers for arguments thank to
> the shell, and if they try to scale they can run into memory
> limitations. I've used it to delete millions of small files on a
> system before.

  i'll accept that, even as i suggest it's a corner case but, sure, it
can happen. i think the point i've been working towards (and how i'll
present xargs in future classes) is that, while it still has value in
really extreme cases like this, its value is more in the features it
brings to the table in terms of delimeters and processing special
characters and so on.

  but, yes, i'll still suggest that the bite-size pieces feature can
come in handy at times.

rday