LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-29-2004, 06:57 AM   #1
guano
LQ Newbie
 
Registered: Aug 2003
Location: Brazil
Distribution: Slackware 9.1
Posts: 1

Rep: Reputation: 0
find a texte inside a unknow file


So, I want to search for a file, but I want to search by some text string within it.
any ideas?

tks.
 
Old 03-29-2004, 10:14 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
grep is the tool to use.

man grep for details, here's an examples:

grep -l root /etc/* => shows the names (-l) of all files in /etc that contain the word root.

Hope this helps.
 
1 members found this post helpful.
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to put file 4GB file INSIDE iso saravkrish Linux - Software 2 03-23-2005 03:41 PM
xwindows mais console texte andre06 Linux - Software 3 03-23-2005 02:37 AM
May I use variables inside /etc/sysconfig/iptables file?...how? leo Linux - Security 2 09-24-2004 09:26 PM
How to view inside an image file wisdom Linux - Software 1 02-17-2004 03:00 PM
A mounted file system inside an NFS mount paradoxlight Linux - Networking 1 04-24-2002 08:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:37 PM.

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