Skip to main content

Questions tagged [locate]

`locate` is a command-line tool for local file search using a database.

1 vote
0 answers
62 views

How can I ensure that locate will search into my user home folder? (macOS)

The locate command doesn't list any search results from files that are in my home folder. Is there a config file to tweak to enable this behavior? sudo locate word didn't work, nor did updating the ...
John Ziegler's user avatar
1 vote
0 answers
145 views

How can I map /mnt/**/* with updatedb to work with (p)locate?

When I use the locate command (specifically plocate 1.1.22), it doesn't seem to include any files under the /mnt directory, i.e. on external drives. The man page for updatedb claims "The whole ...
Josh Brunton's user avatar
2 votes
2 answers
155 views

gwenview pass file names from es.exe command line to everything voidtools

I am trying to pass filenames retrieved from everything voidtools via their es.exe command line invoked in wsl environment. Effectively, it works similarly to mlocate. es.exe communicates with ...
Daniel Krajnik's user avatar
1 vote
1 answer
2k views

To fix the 'locate' database. And to properly update it

I tried to update the locate database, and for some reason it has been corrupted: locate foo locate: locate database header corrupt, bigram char outside 0, 32-127: -1 How to repair it? Or maybe I ...
jsx97's user avatar
  • 1,357
3 votes
2 answers
429 views

locate in cron.daily not updating database

On a standard desktop installation of Ubuntu 24.04, when I try to use the locate command, searches for files that I clearly have in my home directory do not show up -- it appears as if the locate ...
Madeleine P. Vincent's user avatar
0 votes
3 answers
89 views

Does a command exist that lists all the directories where a word appears in a file or directory name?

When I don't remember where a file or a folder is, I sometime use the locate command (that finds more occurrences, allow more candidates than a find, in my mind. But maybe I'm mistaking). But then ...
Marc Le Bihan's user avatar
0 votes
1 answer
307 views

How to install slocate in Ubuntu

I have seen several references to the slocate command [1][2] as a more secure alternative to the locate command. However I cannot install it using sudo apt install slocate. I also cannot find any ...
I'm Root James's user avatar
0 votes
1 answer
132 views

How could updatedb run quickly by avoiding doing full disk scans (maybe not mtime)

How is it possible for updatedb to run very fast by avoiding doing full disk scans? Since mtime of parent folder is not affected by files in subfolders. In Why does the updatedb program run so fast? @...
srtie's user avatar
  • 3
0 votes
1 answer
158 views

Just as there is "locate" to "find". Is there a database for a faster "grep"?

locate (or rather, updatedb) is somewhat simple: it takes the output of find for the required paths (usually '/'), sorts it, and then compresses it with a front-compression tool (frcode), in which the ...
Sebastian Carlos's user avatar
1 vote
0 answers
54 views

Why locate command doesn't recognize `|` meta character as basic regex?

When i use extended regex on locate command work well: └─$ locate --regex "(\.rar|\.zip)" /home/kali/Downloads/linux.zip /usr/lib/jvm/java-...
testter's user avatar
  • 1,510
4 votes
2 answers
977 views

`plocate` couldn't find results in my home dir but `mlocate` could. How to search results in home dir?

Currently I'm trying to migrate from mlocate to plocate. I'm using mlocate in my script (note: locate is aliased to either mlocate or plocate depending which one I've installed). Successfully searched ...
kohane15's user avatar
  • 254
0 votes
1 answer
265 views

Permission denied with locate command in Shell Script in Oracle Linux?

I am trying to run a shell script that contains the command $locate /etc/*.conf to find all files in /etc/ that end in .conf, but whenever I run the script the command line says /etc/chrony.conf: ...
Luke's user avatar
  • 11
11 votes
3 answers
1k views

What is the difference between locate txt vs locate *.txt?

Output of locate txt | head: /etc/brltty/brl-ba-all.txt /etc/brltty/brl-bd-all.txt /etc/brltty/brl-bl-18.txt /etc/brltty/brl-bl-40_m20_m40.txt /etc/brltty/brl-ec-all.txt /etc/brltty/brl-ec-spanish.txt ...
Random Person's user avatar
12 votes
1 answer
11k views

Difference between mlocate and plocate

Since locate doesn't work by default in Ubuntu 22.04.1 LTS, and the message on the terminal says: Command 'locate' not found, but can be installed with: sudo apt install plocate As we can see, it ...
Jason's user avatar
  • 221
3 votes
1 answer
737 views

locate and updatedb do nothing in Linux Mint

I run Linux Mint 21. Currently the locate command always returns no results, and updatedb always returns immediately. The database is sized no more than a few kilobytes. I have verified that the ...
brainchild's user avatar

15 30 50 per page
1
2 3 4 5
10