Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-12-2006, 04:21 AM   #1
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, 04:50 AM   #2
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


Last edited by bhert; 10-12-2006 at 04:51 AM.
Old 10-12-2006, 08:23 AM   #3
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
"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, 01:21 PM   #4
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, 02:26 AM   #5
LQ Newbie
Registered: Oct 2006
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks guys I appreciate it
Old 10-13-2006, 07:48 AM   #6
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, 07:50 AM   #7
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, 07:59 AM   #8
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


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
Search for threads about the dd command minrich LQ Suggestions & Feedback 3 08-14-2006 05:02 AM
command to search ekdya Linux - Newbie 3 11-12-2005 10:46 AM
search using description to get command? Linuxuser_81 Linux - Newbie 1 10-07-2005 01:59 PM
case insensitive search command ColKurtz Linux - Newbie 4 01-20-2005 08:02 AM
search my harddisk - which command ??? merlin23 Linux - Newbie 5 12-14-2004 12:46 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:05 PM.

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