LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-31-2006, 09:26 AM   #1
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
small search engine for searching own computer?


It is common to want to search the computer for a file containing the word 'filth' say. Might do something like:
$ locate lugo/Documents | xargs grep 'filth'
to search the Documents directory for a file with the text 'filth' in it.

Even if this worked the output would be difficult to interpret and unsatisfactory.

Would not a mini-search engine be much better?

Is there such a thing? Thanks any help.
 
Old 03-31-2006, 09:57 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Most Linux distros have a search function as part of the GUI.

What distro are you using?
 
Old 03-31-2006, 10:19 AM   #3
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
If you are using KDE, there is kat. If you are using GNOME there is beagle. In fact beagle works under KDE too.
beagle/kat works silenty, in background, indexing all words in e-mails, openoffice documents, pdf files, Metadata in photos and mp3 files.
When you open the gui, its a matter to search your term in the database, not in the filesystem, which is a lot faster.
 
Old 03-31-2006, 11:36 AM   #4
geeman2.0
Member
 
Registered: Feb 2005
Location: Ontario, Canada
Distribution: Gentoo, Slackware
Posts: 345

Rep: Reputation: 30
What's wrong with
Code:
find lugo/Documents -name 'filth'
???
 
Old 03-31-2006, 04:36 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I think the OP is looking for files containing the text string, not filename(s).
 
Old 04-01-2006, 08:13 AM   #6
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Use a combination of find and grep:

#find all .c files, print all names, and grep for expression
find . -name \*.c -print -exec grep cpufreq\* {} \;

- the text searched for here is cpufreq*
- it is necessary to escape the '*' character
- the backslash and semicolon at the end must really be there
- the -print statement is not necessary, but shows which files have been found satisfying the file name.

jlinkels

Last edited by jlinkels; 04-01-2006 at 11:40 AM.
 
Old 04-04-2006, 12:33 PM   #7
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215

Original Poster
Blog Entries: 2

Rep: Reputation: 49
Great thanks. I'll try the find/grep. Use Debian with Enlightenment as opposed to KDE or Gnome. Will try Beagle or Kat, might work.

Quote:
Originally Posted by syg00
I think the OP is looking for files containing the text string, not filename(s).
OP means 'original poster'
 
  


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
new search engine? markhod General 3 04-08-2005 04:44 PM
local search engine ?? koodoo Linux - Newbie 2 03-23-2005 02:12 PM
search engine jean-michel LQ Suggestions & Feedback 2 04-09-2004 12:40 PM
LQ search engine Tinkster LQ Suggestions & Feedback 6 03-16-2003 01:57 PM
Search Engine? phek Linux - General 1 09-20-2001 07:00 PM

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

All times are GMT -5. The time now is 06:07 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