ggreer / the_silver_searcher

A code-searching tool similar to ack, but faster.

Home Page:http://geoff.greer.fm/ag/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Skip error ouput while earching

maxpavlov opened this issue · comments

I am searching for text occurrences in all files like this:

ag 'search term' /

However, searching the entire filesystem gives a lot of ERR: Permission denied errors which is fine. Is there a way (a param or whatever) to force the silver searcher to not output any errors and just display actual findings, if any?

If not, perhaps something to add to the backlog?

Thanks.

Hi, you can use ag 'search term' / 2>/dev/null
This is no ag options, you know, it redirects stderr (fd 2) to the black hole.