bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-grep] avoiding non-plain files with -I


From: Jacob Lerner
Subject: [bug-grep] avoiding non-plain files with -I
Date: Sun, 01 May 2005 19:03:59 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040316

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

[Prev in Thread] Current Thread [Next in Thread]