I want to do a recursively grep. So typically I will do the following:
grep pattern -r /some/path
Normally this will work. However, when there a FIFO file resides in the path, grep will stuck there.
johnson@ISD32_54_sles10:~/tmp$ ls -l 1
prw-r--r-- 1 neoli users 0 2012-05-16 17:24 1
Then I call the strace command to identify the problem, I got this.
...
stat64("./1", {st_mode=S_IFIFO|0644, st_size=0, ...}) = 0
open("./1", O_RDONLY|O_LARGEFILE) = 3
read(3, <unfinished ...>
So my problem is how to do a recursively grep when there is a FIFO in the path? Does grep has a command line option which will tell grep to ignore FIFO when specified?
Thanks for your kind help.
From
man grep(GNU)