hombrew: brew install gxargs

The xargs utility on Mac is not the same as the one on linux. In particular, searching for files with the mdfind utility will not properly escape files to be processed.

Using homebrew you can install the GNU version of xargs as gxargs, and you can use the syntax you’re accustomed to from GNU/Linux.

For me this is equivalent to something like:

mdfind -name "conflicted copy" | gxargs -d '\n' -P 4 echo

To remove the files you can then replace echo with rm – but be careful!

Related Posts:

  • No Related Posts
This entry was posted in Mac and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *