LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   locate command not working for me (https://www.linuxquestions.org/questions/linux-newbie-8/locate-command-not-working-for-me-836393/)

nnjond 10-05-2010 03:41 PM

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:/$


acid_kewpie 10-05-2010 03:43 PM

locate is case sensitive, like just about all posix tools.

nnjond 10-05-2010 03:50 PM

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:/$


???

joec@home 10-05-2010 05:00 PM

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.

syg00 10-05-2010 05:07 PM

"man locate" will have a "see also" for updatedb, which will have similar for updatedb.conf

Wonderful things manpages.

grail 10-05-2010 06:42 PM

So silly question but you have run updatedb post the files you are trying to locate were created in that directory?

nnjond 10-06-2010 01:35 AM

Thanks all. The prob seems to be

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


All times are GMT -5. The time now is 12:51 AM.