Where is the mlocate database?

Where is the mlocate database?

Change mlocate Database Location The default database that locate utility reads is /var/lib/mlocate/mlocate.

What is mlocate DB?

mlocate is a merging locate and database package. “Merging” means updatedb reuses the existing database to avoid re-reading most of the file system. This makes the database update faster and does not tax the system caches. mlocate can index several file systems including network file systems for network shares.

How do I update my mlocate database?

To update the mlocate database, you use a utility called updatedb. It should be noted that you will need superuser privileges for this to work properly, is it needs to be executed as root or sudo privileges.

How often is the mlocate DB database updated?

updatedb is usually run daily by cron(8) to update the default database.

Can I remove mlocate DB?

You can disable the scanning of directories that has many files ( /var/www for example) by editing the /etc/updatedb. conf configuration file. If you really want to disable it, then just remove the cronjob.

Can we delete mlocate DB?

It’s safe to delete mlocate. db. xxxxxx files in /var/lib/mlocate , they’ll just get created from scratch next time mlocate runs. If nobody is using locate command, then it can be disabled in /etc/cron.

What is mlocate Cron?

The mlocate. cron handles updatedb for using “locate” command on a machine as you’ve noted. If you do not use locate but instead use find, then you do not need mlocate.

How to hide the existence of a mlocate database?

To make the file existence truly hidden from other users, the database group is set to mlocate and the database permissions prohibit reading the database by users using other means than locate (1), which is set-gid mlocate . Note that the visibility flag is checked only if the database is owned by mlocate and it is not readable by “others”.

Is the mlocate database compatible with GNU locate?

Databases built with –require-visibility no allow users to find names of files and directories of other users, which they would not otherwise be able to do. The accompanying locate (1) utility was designed to be compatible to slocate and attempts to be compatible to GNU locate where possible.

What does locate ( 1 ) do in mlocate?

If FLAG is 1 or yes (the default), locate (1) checks the permissions of parent directories of each entry before reporting it to the invoking user.

How to update database for mlocate-Linux man page?

The PRUNE_BIND_MOUNTS, PRUNEFS, PRUNENAMES and PRUNEPATHS variables, which are modified by some of the options, are documented in detail in updatedb.conf (5) . Add entries in white-space-separated list FS to PRUNEFS . Add entries in white-space-separated list NAMES to PRUNENAMES .