2

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.

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

But when I try to use them, there is no change. For example I expect the command below to change the flag to "no", but nothing happens:

sudo updatedb --prune-bind-mounts no

Just it takes a while to execute and exits without any warnings or errors, when I check the /etc/updatedb.conf content, it's the same as before.

Aref Alikhani
  • 45
  • 1
  • 5

1 Answers1

2

These flags don’t change the configuration file; they affect the invocation of updatedb they are attached to, ignoring the configuration file.

Thus

sudo updatedb --prune-bind-mounts no

runs updatedb with PRUNE_BIND_MOUNTS set to no, regardless of the value set in the configuration file.

If you want to change /etc/updatedb.conf, edit it.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164