Zum Inhalt springen

updatedb

Aus Foxwiki

updatedb - Beschreibung

Beschreibung

Index aktualisieren

updatedb aktualisiert den Index für locate

sudo updatedb

Installation

updatedb ist Teil des Pakets plocate

Aufruf

Optionen

Unix GNU Parameter Beschreibung

Parameter

Umgebungsvariablen

Exit-Status

Wert Beschreibung
0 Erfolg
>0 Fehler

Anwendung

Index aktualisieren

sudo updatedb
Aktualisierung

Tägliche automatische Aktualisierung

/etc/cron.daily/plocate

Problembehebung

Konfiguration

Dateisysteme, Verzeichnisse oder Dateien ausschließen
/etc/updatedb.conf
PRUNENAMES=".git .bzr .hg .svn"
PRUNEPATHS="/tmp /var/spool /media /var/lib/os-prober /var/lib/ceph /home/.ecryptfs /var/lib/schroot"
PRUNEFS="NFS afs autofs binfmt_misc ceph cgroup cgroup2 cifs coda configfs curlftpfs debugfs devfs devpts devtmpfs ecryptfs ftpfs fuse.ceph fuse.cryfs fuse.encfs fuse.glusterfs fuse.gocryptfs fuse.gvfsd-fuse fuse.mfs fuse.rclone fuse.rozofs fuse.sshfs fusectl fusesmb hugetlbfs iso9660 lustre lustre_lite mfs mqueue ncpfs nfs nfs4 ocfs ocfs2 proc pstore rpc_pipefs securityfs shfs smbfs sysfs tmpfs tracefs udev udf usbfs"
PRUNE_BIND_MOUNTS="yes"

updatedb durchsucht die angegebenen Orte nicht und löscht enthaltene Dateien aus dem Index.

Dateien

Datei Beschreibung
/etc/updatedb.conf


Anhang

Siehe auch


Dokumentation

Man-Page
  1. updatedb(8)
Info-Pages

Links

Projekt

Weblinks


TMP

NAME

updatedb - update a database for plocate

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 from a systemd.timer(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 op‐ tions, 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.

--add-single-prunepath PATH Add PATH to PRUNEPATHS. Note that this is currently the only way to add a path with a space in it.

-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 plocate, 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 plocate and the database permissions prohibit reading the data‐ base by users using other means than locate(1), which is set-gid plocate.

Note that the visibility flag is checked only if the database is owned by plocate 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 plocate database as a 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_di‐ rectory.

FILES

/etc/updatedb.conf A configuration file. See updatedb.conf(5). Uses exactly the same format as the one used by mlo‐ cate(1)'s updatedb, so they can be shared.

/var/lib/plocate/plocate.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.

SEE ALSO

locate(1), updatedb.conf(5)


TMP2

NAME

updatedb - Aktualisieren einer Datenbank für plocate

SYNOPSIS

updatedb [OPTION]...

BESCHREIBUNG

updatedb erstellt oder aktualisiert eine von locate(1) verwendete Datenbank. Wenn die Datenbank bereits existiert, werden ihre Daten wiederverwendet, um das erneute Lesen von Verzeichnissen, die sich nicht geändert haben, zu vermeiden.

updatedb wird normalerweise täglich von einem systemd.timer(8) ausgeführt, um die Standarddatenbank zu aktualisieren.

EXIT STATUS

updatedb kehrt mit dem Exit-Status 0 bei Erfolg, 1 bei Fehler zurück.

OPTIONEN

Die PRUNE_BIND_MOUNTS, PRUNEFS, PRUNENAMES und PRUNEPATHS Variablen, die durch einige der Optionen verändert werden, sind im Detail in updatedb.conf(5).

-f, --add-prunefs FS
Einträge in der durch Leerzeichen getrennten Liste FS zu PRUNEFS hinzufügen.
-n, --add-prunenames NAMEN
Einträge in der durch Leerzeichen getrennten Liste NAMEN zu PRUNENAMEN hinzufügen.
-e, --add-prunepaths PATHS
Einträge in der durch Leerzeichen getrennten Liste PATHS zu PRUNEPATHS hinzufügen.
--add-single-prunepath PATH
Fügt PATH zu PRUNEPATHS hinzu. Beachten Sie, dass dies derzeit die einzige Möglichkeit ist, einen Pfad mit einem Leerzeichen darin hinzuzufügen.
-U, --database-root PATH
Speichert nur die Ergebnisse des Scannens des Teilbaums des Dateisystems mit der Wurzel PATH in der erzeugten Datenbank. Standardmäßig wird das gesamte Dateisystem gescannt. locate(1) gibt Einträge als absolute Pfadnamen aus, die keine symbolischen Links enthalten, unabhängig von der Form von PATH.
--debug-pruning
Debugging-Informationen über Beschneidungsentscheidungen in die Standardfehlerausgabe schreiben.
-h, --help
Eine Zusammenfassung der verfügbaren Optionen auf die Standardausgabe schreiben und erfolgreich beenden.
-o, --Output DATEI
Schreiben Sie die Datenbank nach DATEI, anstatt die Standarddatenbank zu verwenden.
--prune-bind-mounts FLAG
Setzen Sie PRUNE_BIND_MOUNTS auf FLAG und überschreiben Sie damit die Konfigurationsdatei.
--prunefs FS
Setzt PRUNEFS auf FS und setzt damit die Konfigurationsdatei außer Kraft.
--prunenames NAMEN
Setzen Sie PRUNENAMES auf NAMES und setzen Sie damit die Konfigurationsdatei außer Kraft.
--prunepaths PATHS
Setzen Sie PRUNEPATHS auf PATHS und setzen Sie damit die Konfigurationsdatei außer Kraft.
-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 plocate, 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 plocate and the database permissions prohibit reading the database by users using other means than locate(1), which is set-gid plocate. Note that the visibility flag is checked only if the database is owned by plocate 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.

BEISPIELE

Um eine private Standortdatenbank als ein anderer Benutzer als root zu erstellen, ausführen

updatedb -l 0 -o db_file -U Quellverzeichnis Beachten Sie, dass alle Benutzer, die db_file lesen können, die vollständige Liste der Dateien im Teilbaum von Quellverzeichnis erhalten können.

DATEIEN

/etc/updatedb.conf
Eine Konfigurationsdatei. Siehe updatedb.conf(5). Verwendet genau das gleiche Format wie das von mlocate(1)'s updatedb, so dass sie gemeinsam genutzt werden können.
/var/lib/plocate/plocate.db
Die standardmäßig aktualisierte Datenbank.

SICHERHEIT

Datenbanken, die mit --require-visibility no erstellt wurden, ermöglichen es Benutzern, die Namen von Dateien und Verzeichnissen anderer Benutzer zu finden, was ihnen sonst nicht möglich wäre.

AUTOR

Miloslav Trmac <mitr@redhat.com>

Steinar H. Gunderson <steinar+plocate@gunderson.no>

SEE ALSO

locate(1), updatedb.conf(5)