LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-05-2010, 04:41 PM   #1
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Rep: Reputation: 31
locate command not working for me


Hi,

Am I missing something here?

Code:
nnjond@nnjond-den:/$ cd /media/disk/Dual_Data/
nnjond@nnjond-den:/media/disk/Dual_Data$ ls

07_Magna_DOWNLOADS   21_TEMPS          Peleas.htm
08_Self-Improvement  22_Desktop        Pelleas.odt
nnjond@nnjond-den:/media/disk/Dual_Data$ cd /.
nnjond@nnjond-den:/$ locate -b peleas
nnjond@nnjond-den:/$ locate -b peleas.*
nnjond@nnjond-den:/$ locate -i peleas
nnjond@nnjond-den:/$
 
Old 10-05-2010, 04:43 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
locate is case sensitive, like just about all posix tools.
 
Old 10-05-2010, 04:50 PM   #3
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Original Poster
Rep: Reputation: 31
nnjond@nnjond-den:/media/disk/Dual_Data$ cd /.
nnjond@nnjond-den:/$ locate -b peleas
nnjond@nnjond-den:/$ locate -b peleas.*
nnjond@nnjond-den:/$ locate -i peleas
nnjond@nnjond-den:/$ locate -i Peleas
nnjond@nnjond-den:/$ locate -b Peleas
nnjond@nnjond-den:/$ locate -b Peleas.*
nnjond@nnjond-den:/$


???
 
Old 10-05-2010, 06:00 PM   #4
joec@home
Member
 
Registered: Sep 2009
Location: Galveston Tx
Posts: 291

Rep: Reputation: 70
It should be noted that the find command operates in real time, where as the locate command operates from an index. From this locate can tell you about what the drive looked like from a historical perspective. Otherwise you will need to re-index the drive with the command updatedb.
 
Old 10-05-2010, 06:07 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,847

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
"man locate" will have a "see also" for updatedb, which will have similar for updatedb.conf

Wonderful things manpages.
 
Old 10-05-2010, 07:42 PM   #6
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,255

Rep: Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686
So silly question but you have run updatedb post the files you are trying to locate were created in that directory?
 
Old 10-06-2010, 02:35 AM   #7
nnjond
Member
 
Registered: Feb 2007
Distribution: Ubuntu 10.04
Posts: 281

Original Poster
Rep: Reputation: 31
Thanks all. The prob seems to be

/media appears in the /etc /updatedb.conf in PRUNEPATHS
 
  


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
why locate command is not working? sathyguy Linux - Enterprise 2 07-29-2007 10:32 AM
cpan> locate -u Unknown shell command 'locate -u'. Type ? for help. sharad2005 Linux From Scratch 1 08-04-2006 01:40 AM
How to use locate command MartinOG Linux - Newbie 3 06-07-2004 02:59 PM
using locate command stabu Linux - Newbie 6 03-26-2004 05:13 AM
What command will locate a particular.. cbjhawks Linux - General 1 03-21-2004 09:07 AM


All times are GMT -5. The time now is 07:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration