The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How can i open a directory and search a word using awk.... stalin2020 Shell Programming and Scripting 2 06-02-2008 09:13 AM
Need to search and replace in multiple files in directory hierarchy umen Shell Programming and Scripting 3 12-24-2007 04:56 AM
Search about word abu_hassan SUN Solaris 3 02-19-2007 01:17 PM
How to search files containing a specific word in the content amjath78 UNIX for Dummies Questions & Answers 1 01-03-2007 03:42 PM
search all files and sub directory siva_jm Shell Programming and Scripting 5 06-21-2004 12:17 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 3 votes, 3.00 average. Display Modes
  #1 (permalink)  
Old 10-31-2006
legato legato is offline
Registered User
  
 

Join Date: Nov 2004
Location: singapore
Posts: 40
search for certain word in a files from directory

hi

can i know how to get the file name of any files containing for example "abc" from a number of files in a directory?
i tried "ls -ltrc | grep abc" but no resulted generated.

thanks in advance.
  #2 (permalink)  
Old 10-31-2006
pressy's Avatar
pressy pressy is offline Forum Staff  
solaris cultist
  
 

Join Date: Aug 2003
Location: Vienna / Austria (Europe) [EARTH]
Posts: 726
perhabs:

# grep abc * | awk -F\: '{print $1}' | uniq

regards pressy
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 03:34 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0