LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-29-2004, 07:20 AM   #1
HadesThunder
Member
 
Registered: Mar 2004
Location: London
Distribution: Mandrake 9.1
Posts: 281

Rep: Reputation: 30
Searching all directories


I would like to know if there is a command or software that allows you to search for a file containing certain text "eg= mozilla" in all directories? I have tried 'find' but it only searches the current directory.
 
Old 04-29-2004, 07:36 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Re: Searching all directories

Quote:
Originally posted by HadesThunder
I would like to know if there is a command or software that allows you to search for a file containing certain text "eg= mozilla" in all directories? I have tried 'find' but it only searches the current directory.
Well, you'd have to invoke this command when using find to search the whole filesystem:

find / -name <your-search-here>

You can also use locate, whereis, etc.
 
Old 04-29-2004, 07:37 AM   #3
profjohn
Member
 
Registered: Mar 2004
Location: Jinhua, People's Republic of China
Distribution: MDK, RH, KNPX
Posts: 161

Rep: Reputation: 30
The terminal window command "whereis" will locate binary, source, and man pages.

To find out about this command, type "man whereis" in a terminal window.

The terminal window command "locate" lets you serarch for any files on your system.

To find out about this command type "man locate" in a terminal window.

If you are looking for a text string and locate does not get it, try:

grep -Hn string `find / -name *.ext
 
  


Reply


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
CHMOD directories.sub-directories.files zerojosh Linux - Software 2 11-19-2005 03:22 PM
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 12:23 PM
Searching ??? ilnli Linux - General 5 01-03-2005 04:27 AM
I have been searching but.... Jacksenflamed Linux - Newbie 6 03-17-2004 08:26 PM
Searching mjgeiger Linux - Newbie 4 06-05-2002 07:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:51 AM.

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