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 (p,b,c)


From: Jacob Lerner
Subject: [bug-grep] avoiding non-plain files with -I (p,b,c)
Date: Mon, 18 Apr 2005 15:33:44 +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.)

Does grep have a option to ignore all non-plainfiles (
FIFOs(p), devices (b,c)) ? WHat if -I option can be aliased to ignore
non-plainfiles ?

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]