Anyone know how to make updatedb ignore 'hidden' paths? This isn't any kind of security issue; I just want updates to be faster. I've tried using the -n and -e flags with '.*' to no avail.
Asked
Active
Viewed 908 times
1 Answers
5
You can define directories that should be omitted in /etc/updatedb.conf
. You can use regular expressions, citing GNU:
--prunepaths='path...'
Directories to omit from the database, which would otherwise be included. The environment variable PRUNEPATHS also sets this value. Default is /tmp /usr/tmp /var/tmp /afs. The paths are used as regular expressions (with find ... -regex, so you need to specify these paths in the same way that find will encounter them. This means for example that the paths must not include trailing slashes.
So change the following line in /etc/updatedb.conf
:
PRUNEPATHS="/tmp /var/spool /media"
to:
PRUNEPATHS="/tmp /var/spool /media .*/\..*"
should work just fine ;-)

binfalse
- 879