Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-11-2005, 04:24 AM   #1
LQ Newbie
Registered: Apr 2005
Location: India
Distribution: REd Hat AS 3.0
Posts: 4

Rep: Reputation: 0
Lightbulb 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.
Old 04-11-2005, 04:37 AM   #2
Senior Member
Registered: Mar 2004
Location: england
Distribution: Debian, Mint, Puppy, Raspbian
Posts: 3,432

Rep: Reputation: 203Reputation: 203Reputation: 203

find . -type f -exec grep -n 'Computer'  /dev/null  {} \; |  grep :1:
Old 04-11-2005, 10:31 AM   #3
LQ Newbie
Registered: Apr 2005
Location: India
Distribution: REd Hat AS 3.0
Posts: 4

Original Poster
Rep: Reputation: 0
Smile Thanks!

Thanks Billy i get it.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the Package Search pattern Syntax for dpkg --list? Akhran Debian 3 08-23-2005 05:23 AM
Find command using 2 search conditions nifflerX Linux - General 8 07-15-2005 01:37 PM
search for pattern in files and replace mizuki26 Linux - Newbie 3 01-04-2004 11:57 AM
Pattern search in a line jitz Linux - General 2 12-06-2003 04:50 AM
multiline pattern search in a file mimi Linux - General 1 09-01-2002 12:22 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration