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 - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-12-2006, 03:21 AM   #1
IonMarais
LQ Newbie
 
Registered: Oct 2006
Posts: 19

Rep: Reputation: 0
search command?


Hey there guys, I have a stupid question to ask u. I know that linux updates itself with updatedb at night. problem is I forgot the command to search for files.Maybe someone can remember that command?
 
Old 10-12-2006, 03:50 AM   #2
bhert
Member
 
Registered: May 2006
Distribution: OpenSUSE 10.3 Kubuntu Hardy Heron
Posts: 268

Rep: Reputation: 30
Most people use find or locate
read the man pages for more info about these commands

-bhert

Last edited by bhert; 10-12-2006 at 03:51 AM.
 
Old 10-12-2006, 07:23 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
"locate" is the one that uses the database that is updated by updatedb.

Note that updatedb only run every night if it is setup to do so using cron.

I seem to remember that "locate" is intended to find programs, and "find" is more general--not sure about this, however.
 
Old 10-12-2006, 12:21 PM   #4
Timur
LQ Newbie
 
Registered: Oct 2006
Location: Samarkand, Uzbekistan and Oklahoma, USA
Distribution: Debian Sarge
Posts: 29

Rep: Reputation: 15
There are many ways to do it. The easiest is locate. YOu just type the file you need and it gives you the location. However if you need to look INSIDE the text of the file, you need different command (don't exactly remember which one :-) )
I preffer using MC (midnight commander) for searching
 
Old 10-13-2006, 01:26 AM   #5
IonMarais
LQ Newbie
 
Registered: Oct 2006
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks guys I appreciate it
 
Old 10-13-2006, 06:48 AM   #6
khaleel5000
Member
 
Registered: Oct 2005
Location: Pakistan
Distribution: Debian,Pclinuxos
Posts: 327

Rep: Reputation: 31
IonMarais congracts for folder thing , I read this as the signature of some user but its really true
"The only stupid question is the one thats left unasked - so ask it"
 
Old 10-13-2006, 06:50 AM   #7
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
you can use slocate aswell (which comes with modern distro releases i believe.

It's purpose is to be more secure than locate as i understand it. Somehow filtering search results aganst permissions and discarding those you don't have permission to view.
 
Old 10-13-2006, 06:59 AM   #8
teebones
Member
 
Registered: Aug 2005
Location: /home/teebones
Distribution: sometimes this, sometimes that..
Posts: 502

Rep: Reputation: 56
You could also use "grep" command in combination with a pipe

grep blabla | bin

e.g. searches for the binairy files with blabla in the name
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Search for threads about the dd command minrich LQ Suggestions & Feedback 3 08-14-2006 04:02 AM
command to search ekdya Linux - Newbie 3 11-12-2005 09:46 AM
search using description to get command? Linuxuser_81 Linux - Newbie 1 10-07-2005 12:59 PM
case insensitive search command ColKurtz Linux - Newbie 4 01-20-2005 07:02 AM
search my harddisk - which command ??? merlin23 Linux - Newbie 5 12-14-2004 11:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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