Results 1 to 2 of 2
Hi,
How can i find a specific string pattern in the entire tree(several directories containing multiple sub directories ) ?
$ find ./ -type f |grep "<pattern>" will not do ...
- 05-24-2007 #1
locating a string pattern in a tree
Hi,
How can i find a specific string pattern in the entire tree(several directories containing multiple sub directories ) ?
$ find ./ -type f |grep "<pattern>" will not do as it will just give the names of directories (relative pathname containing the pattern).
grepping for the pattern in a directory containing files only work,but this is not what i want.
i need to look for the specific <pattern> in the entire tree .
"xargs" might do the job,but i've never used it before : (
Thanks,
~amit
- 05-24-2007 #2
i guess i found what i was looking for
find ./ -type f|xargs grep <pattern>|more


Reply With Quote