Header Ads Widget

[MAN] updatedb

Content-type: text/html; charset=UTF-8 Man page of updatedb.conf

updatedb.conf

Section: File Formats (5)
Updated: Jun 2008
Index Return to Main Contents

 

NAME

/etc/updatedb.conf - a configuration file for updatedb(8)

 

DESCRIPTION

/etc/updatedb.conf is a text file. Blank lines are ignored. A # character outside of a quoted string starts a comment extending until end of line.

Other lines must be of the following form:

VARIABLE = "VALUE"

White space between tokens is ignored. VARIABLE is an alphanumeric string which does not start with a digit. VALUE can contain any character except for ". No escape mechanism is supported within VALUE and there is no way to write VALUE spanning more than one line.

Unknown VARIABLE values are considered an error. The defined variables are:

PRUNEFS
A whitespace-separated list of file system types (as used in /etc/mtab) which should not be scanned by updatedb(8). The file system type matching is case-insensitive. By default, no file system types are skipped.

When scanning a file system is skipped, all file systems mounted in the subtree are skipped too, even if their type does not match any entry in PRUNEFS.

PRUNENAMES
A whitespace-separated list of directory names (without paths) which should not be scanned by updatedb(8). By default, no directory names are skipped.

Note that only directories can be specified, and no pattern mechanism (e.g. globbing) is used.

PRUNEPATHS
A whitespace-separated list of path names of directories which should not be scanned by updatedb(8). Each path name must be exactly in the form in which the directory would be reported by locate(1).

By default, no paths are skipped.

PRUNE_BIND_MOUNTS
One of the strings 0, no, 1 or yes. If PRUNE_BIND_MOUNTS is 1 or yes, bind mounts are not scanned by updatedb(8). All file systems mounted in the subtree of a bind mount are skipped as well, even if they are not bind mounts. As an exception, bind mounts of a directory on itself are not skipped.

By default, bind mounts are not skipped.

 

NOTES

When a directory is matched by PRUNEFS, PRUNENAMES or PRUNEPATHS, updatedb(8) does not scan the contents of the directory. The path of the directory itself is, however, entered in the created database. For example, if /tmp is in PRUNEPATHS, locate(1) will not show any files stored in /tmp, but it can show the /tmp directory. This behavior differs from traditional locate implementations.

In some updatedb(8) implementations PRUNEPATHS can be used to exclude non-directory files. This is not the case in this implementation.

/etc/updatedb.conf is a shell script in some implementations, which allows much more flexibility in defining the variables. Equivalent functionality can be achieved by using the command-line options to updatedb(8).

 

AUTHOR

Miloslav Trmac <mitr@redhat.com>

 

SEE ALSO

locate(1), updatedb(8)


 

Index

NAME
DESCRIPTION
NOTES
AUTHOR
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 04:45:54 GMT, September 16, 2022 Content-type: text/html; charset=UTF-8 Man page of updatedb

updatedb

Section: Maintenance Commands (8)
Updated: Jun 2008
Index Return to Main Contents

 

NAME

updatedb - update a database for mlocate

 

SYNOPSIS

updatedb [OPTION]...

 

DESCRIPTION

updatedb creates or updates a database used by locate(1). If the database already exists, its data is reused to avoid rereading directories that have not changed.

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

 

EXIT STATUS

updatedb returns with exit status 0 on success, 1 on error.

 

OPTIONS

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).

-f, --add-prunefs FS
Add entries in white-space-separated list FS to PRUNEFS.

-n, --add-prunenames NAMES
Add entries in white-space-separated list NAMES to PRUNENAMES.

-e, --add-prunepaths PATHS
Add entries in white-space-separated list PATHS to PRUNEPATHS.

-U, --database-root PATH
Store only results of scanning the file system subtree rooted at PATH to the generated database. The whole file system is scanned by default.

locate(1) outputs entries as absolute path names which don't contain symbolic links, regardless of the form of PATH.

--debug-pruning
Write debugging information about pruning decisions to standard error output.

-h, --help
Write a summary of the available options to standard output and exit successfully.

-o, --output FILE
Write the database to FILE instead of using the default database.

--prune-bind-mounts FLAG
Set PRUNE_BIND_MOUNTS to FLAG, overriding the configuration file.

--prunefs FS
Set PRUNEFS to FS, overriding the configuration file.

--prunenames NAMES
Set PRUNENAMES to NAMES, overriding the configuration file.

--prunepaths PATHS
Set PRUNEPATHS to PATHS, overriding the configuration file.

-l, --require-visibility FLAG
Set the ``require file visibility before reporting it'' flag in the generated database to FLAG.

If FLAG is 0 or no, or if the database file is readable by "others" or it is not owned by mlocate, locate(1) outputs the database entries even if the user running locate(1) could not have read the directory necessary to find out the file described by the database entry.

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. 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".

-v, --verbose
Output path names of files to standard output, as soon as they are found.

-V, --version
Write information about the version and license of locate on standard output and exit successfully.

 

EXAMPLES

To create a private mlocate database as an user other than root, run
updatedb -l 0 -o db_file -U source_directory
Note that all users that can read db_file can get the complete list of files in the subtree of source_directory.

 

FILES

/etc/updatedb.conf
A configuration file. See updatedb.conf(5).

/var/lib/mlocate/mlocate.db
The database updated by default.

 

SECURITY

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.

 

NOTES

The accompanying locate(1) utility was designed to be compatible to slocate and attempts to be compatible to GNU locate where possible. This is not the case for updatedb.

 

AUTHOR

Miloslav Trmac <mitr@redhat.com>

 

SEE ALSO

locate(1), mlocate.db(5), updatedb.conf(5)


 

Index

NAME
SYNOPSIS
DESCRIPTION
EXIT STATUS
OPTIONS
EXAMPLES
FILES
SECURITY
NOTES
AUTHOR
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 04:46:01 GMT, September 16, 2022

댓글 쓰기

0 댓글