When I'm grepping recursively starting from /etc or from /,
I often observe 'grep -r -I' stuck. THis happens when there is FIFO node
under /etc. I believe grep is stuck trying to open FIFO "files". Might be also stuck opening device files (b/c nodes), I'm not sure about it.


Is it possible to have grep ignore p(FIFO) and devices(b,c) without trying
to open them ? Is there such a switch ? DOes grep do it with -I switch ?

My workaround is ugly, I do something like 'find /etc -type f | grep+ regex'
where grep+ is a script which reads filenames from stdin and greps them.
This is slow, though, but does avoid being stuck on non-plainfiles.

Yakov Lerner





Reply via email to