Questions tagged [locate]

A command line application that shows file locations.

Locate (locate) is a command that shows file locations in the terminal. For example:

locate two would show all files with "two" in the name. The search can be narrowed using file extensions or by using grep.

126 questions
19
votes
4 answers

How come the locate command doesn't find obvious files?

The locate command sounds intuitive. I would expect it to locate files on the filesystem. However, it rarely finds files on the system that are indeed present: $ locate ipsec.secrets This gives no results, even when run from filesystem root…
JohnMerlino
  • 7,309
6
votes
3 answers

Locate name doesn't work

There is a file at /user/share/jogl.jar. I am using locate jogl.jar but it doesn't work. Why?
rebuked
  • 827
  • 2
  • 7
  • 11
3
votes
2 answers

Unable to use "locate" command to find a file created in my home directory

I'm new to linux. And I'm just exploring terminal. I created a file touch Desktop/vvv. Now I updated the database using sudo updatedb. The command locate vvv doesn't shows any result. While it just works fine with find / -name vvv . I have found…
Aditya
  • 63
1
vote
2 answers

Why does locate */file*name work, and locate file*name does not?

The following is working as inteded: $ locate */synse_*_r_unseen_zs.npy /mnt/home/dario/temp/synse_resources/language_modelling/repo_test_cadavae_5_r_val/bert/cadavae_5_r_unseen_zs.npy …
WurmD
  • 111
1
vote
1 answer

Why doesn't 'locate' find files in '/run' directory?

The command sudo find / -name "php7.2-fpm.sock" returns /run/php/php7.2-fpm.sock but sudo locate php7.2-fpm.sock is empty. PS: used sudo updatedb before.
0
votes
1 answer

use locate command to find only files, excluding symbolic links and directories

I'm trying to use locate to find any files on my system that contain the word 'Jaynes'. Unfortunately there's a symbolic link called Jaynes that points to a directory. I want to exclude all symbolic links and directories from my locate…
Leo Simon
  • 1,529
0
votes
1 answer

Locate Command S option does not work

I have installed the command (sudo apt install locate, sudo spt install mlocate) but the option s is not there. Cna somebody help me?
0
votes
0 answers

I cannot find the file /var/lib/mlocate.db

I have Ubuntu 22.04.2 LTS installed on my Raspberry Pi and I try to find/open the file /var/lib/mlocate.db but I cannot find it. I installed locate package. It's because I'm doing an online course from Linux Professional Institute (LPI) and I read…
0
votes
0 answers

Unable to locate network scripts package

I’m trying to install network-scripts package on ubuntu and keep receiving the error “unable to locate package”. Is there a different name for network scripts?
0
votes
0 answers

locate command does not retrive files

When I use locate command with my personal account, it does not find anything, not even obvious old files. Using the same command with root privileges does find files. Using the same command when I am logged into my personal account via ssh works as…
hans
  • 187