Skip error ouput while earching
maxpavlov opened this issue · comments
Max Pavlov commented
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.
Marcelo Canales commented
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.