LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   pattern search through find command. (http://www.linuxquestions.org/questions/linux-newbie-8/pattern-search-through-find-command-311932/)

abhi 04-11-2005 04:24 AM

pattern search through find command.
 
Through Find command How can i find files those are having pattern like "Computer" Written in there first line.
i wants to display only name of the file those are having above mentioned pattern.

bigearsbilly 04-11-2005 04:37 AM

try:

Code:


find . -type f -exec grep -n 'Computer'  /dev/null  {} \; |  grep :1:


abhi 04-11-2005 10:31 AM

Thanks!
 
Thanks Billy i get it.


All times are GMT -5. The time now is 07:09 AM.