1

I know there is a file in /media folder, then I searched with locate command, but it doesn't locate the file. I did sudo updatedb, then locate command again, but it doesn't locate the file.

I suspect locate path environment parameter since /media folder filesystem is on a seperate hard disk from the main stuff.

Should I edit locate path environment parameter?? How do I do it? or Am I missing more??

Sergiy Kolodyazhnyy
  • 103,293
  • 19
  • 273
  • 492
Smile
  • 1,089
  • 3
  • 19
  • 31
  • Well, what command did you do ? `locate filename`? – Sergiy Kolodyazhnyy Nov 30 '17 at 05:49
  • yes. locate filename. locate directory name. locate whatever. I tried many things since there wasn't any success. – Smile Nov 30 '17 at 05:51
  • do a `sudo updatedb` before the `locate` command so local file records get updated! – George Udosen Nov 30 '17 at 05:52
  • @George OP stated in the question they did that :/ – Sergiy Kolodyazhnyy Nov 30 '17 at 06:13
  • 2
    @Smile take a look at this one : https://askubuntu.com/q/60202/295286 Let us know if that helps – Sergiy Kolodyazhnyy Nov 30 '17 at 06:14
  • My mistake especially when the format is a bit off @SergiyKolodyazhnyy – George Udosen Nov 30 '17 at 06:20
  • If the other question doesn't help, please [edit] your question explaining what you've tried and we will reopen it – Zanna Nov 30 '17 at 10:25
  • I followed the link and confirmed there is PRUNEPATHS = /media with other folder names in /etc/updatedb.conf file. I also did "sudo updatedb" again. Then "locate blueprints.txt", "sudo locate blueprints.txt", "locate /media/blueprints.txt" "locate whatever" really. I did all combinations. I'm tired of this "locate" command. I'll probably just use "find" command. I just wanted to be proficient. Maybe next time I'll find out what caused this issue. Thanks guys really. I'll keep studying. Have a nice day:) – Smile Dec 01 '17 at 10:24

0 Answers0