9

I'm on a mac and I don't want to use the builtin xargs utility. Because it's different with the gnu xargs. After google around I found xargs belongs to the findutils package in homebrew and I can install it with a simple command brew install findutils. My question is, it there a simpler way to identify xargs belongs to findutils?

Thanks.

Travis Northcutt
  • 24,666
  • 9
  • 42
  • 51
Just a learner
  • 26,690
  • 50
  • 155
  • 234
  • 2
    `which xargs` will show the path. /usr/bin/xargs on mac is the system bsd. you can add this to your path to ensure xargs from brew findutils: `PATH="$(brew --prefix findutils)/libexec/gnubin:$PATH"; export PATH` – Mike D Oct 23 '19 at 13:57
  • 1
    as of today, you can find xargs in findutils by finding this question as the top result on google. – Matthias Winkelmann Feb 28 '20 at 22:36

1 Answers1

26

brew search --desc xargs

will give the result

findutils: Collection of GNU find, xargs, and locate

The --desc option is required to search in the descriptions. It does not search in the list of files provided by each package. I believe this may be impossible because brew's formula don't include this list of files.

Vortexfive
  • 1,889
  • 13
  • 19