LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-05-2010, 03: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, 03:43 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
locate is case sensitive, like just about all posix tools.
 
Old 10-05-2010, 03: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, 05: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, 05:07 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

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

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

Rep: Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192
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, 01: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



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

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

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