Questions tagged [updatedb]

The tool to update the search database used by locate for finding files or paths. This tool is typically run daily to keep the index up recent changes in the filesystem.

37 questions
29
votes
5 answers

Can I just disable updatedb?

Is updatedb necessary at all? I never use locate and my servers tend to have dozens of millions of files which usually makes updatedb to run for a long time and consume I/O needed by MySQL and/or other software. Can I just remove it from cron and…
matt
  • 517
  • 1
  • 6
  • 13
27
votes
2 answers

Why does the `updatedb` program run so fast?

Usually when I have programs that are doing a full disk scan and going over all files in the system they take a very long time to run. Why does updatedb run so fast in comparison?
hugomg
  • 5,543
  • 4
  • 35
  • 53
27
votes
3 answers

What kind of database do `updatedb` and `locate` use?

The locate program of findutils scans one or more databases of filenames and displays any matches. This can be used as a very fast find command if the file was present during the last file name database update. There are many kinds of databases…
Tim
  • 98,580
  • 191
  • 570
  • 977
23
votes
2 answers

updatedb: can not open a temporary file for `/var/lib/mlocate/mlocate.db'

I go to use the updatedb command to update the index and I get updatedb: can not open a temporary file for `/var/lib/mlocate/mlocate.db' fyi The locate command is working, e.g. $ locate…
Michael Durrant
  • 41,213
  • 69
  • 165
  • 232
11
votes
1 answer

How is updatedb so much faster than find?

How is updatedb so much faster than find? Here's a timed comparison between updatedb and a find command that does a seemingly similar task. compare.sh #!/usr/bin/env bash cmd="sudo updatedb" echo $cmd time eval $cmd cmd="sudo find / \ -fstype…
Praxeolitic
  • 1,638
  • 3
  • 18
  • 24
10
votes
3 answers

How to add specific directories to "updatedb" (locate) search path?

I keep my digital music and digital photos in directories in a Windows partition, mounted at /media/win_c on my dual-boot box. I'd like to include those directories—but only those directories—in the locate database. However, as far as I can make…
ionh
  • 133
  • 1
  • 1
  • 7
9
votes
2 answers

why updatedb command takes too much time?

I have read that to run locate command on CYGWIN first I need to run the following command. updatedb --localpaths=c:/ what this command exactly do as I run this on CYGWIN and it is taking too much time.
Elvin
  • 851
  • 2
  • 8
  • 9
7
votes
2 answers

How to fix "updatedb: can not find group ` mlocate'" on entware?

I have installed the mlocate package on Asus RT-N56U running Padavan with Entware-ng, which is based on OpenWrt. This embedded Linux distribution has SSH enabled. My locate results are out of date. When I use the updatedb command this error…
Pro Backup
  • 4,686
  • 12
  • 50
  • 82
4
votes
1 answer

Updatedb unrecognized option '--localpaths='

I am attempting to update a single directory I created. I'm using updatedb so it will be found by the locate command. Command used: updatedb --localpaths='/frodo/lib/modules/3.12.3-031203-generic/kernel' Output: updatedb: unrecognized option…
iyrin
  • 1,875
  • 11
  • 23
3
votes
3 answers

How to monitor directory/file changes to rebuild index?

Just moved to Ubuntu 12.04 from Windows 7. Under Win 7 I use "Everything" to search files and directories, it can build the index database and update it once any file or directory changes. I'm very used to it so I want know if there is something…
ChandlerQ
  • 141
  • 1
  • 5
3
votes
1 answer

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 package mlocate is installed. The updatedb…
brainchild
  • 330
  • 2
  • 16
3
votes
2 answers

updatedb can not create temporary file for a custom database file

I am trying to create a custom mlocate db for my home directory. When running the updatedb it complains about inability to open a temporary file. 55;~/>uname -a Linux yoga 4.12.14-lp151.28.59-default #1 SMP Wed Aug 5 10:58:34 UTC 2020 (337e42e)…
R. Matveev
  • 71
  • 7
2
votes
1 answer

Can updatedb keep localpaths for removable drives that aren't plugged in?

I run updatedb like this: updatedb --localpaths="/a /b" /a is a removable drive. /b is the local hard drive. Although /a's not always accessible to me, I frequently want to run locate to find if I have a certain file on it (based on the last time I…
2
votes
1 answer

How can I change the configuration of /etc/updatedb.conf file?

Based on the man page of the command "updatedb", we can change and override the configuration of /etc/updatedb.conf using the below commands: --prune-bind-mounts FLAG Set PRUNE_BIND_MOUNTS to FLAG, overriding the configuration file. …
Aref Alikhani
  • 45
  • 1
  • 5
2
votes
1 answer

updatedb for a beginner

The updatedb command, as I understand it, is basically the utility that keeps the mlocate.db database file updated. And it's a good idea to keep it updated regularly. For that matter, I've kept a daily cron to run the updatedb command. Now I'm…
1
2 3