Skip to content

Instantly share code, notes, and snippets.

@mwilliammyers
Last active June 2, 2024 21:35
Show Gist options
  • Save mwilliammyers/1c3975e1369848d961e5583889fd4e23 to your computer and use it in GitHub Desktop.
Save mwilliammyers/1c3975e1369848d961e5583889fd4e23 to your computer and use it in GitHub Desktop.
/etc/updatedb.conf
# locate --regex '.*\/(\w+[^\.]\w+$)+'
PRUNE_BIND_MOUNTS="yes"
PRUNENAMES=".git .bzr .hg .svn Trash Cache cache .cache logs fonts font Frameworks atom .atom apm .apm .ansible .idea libreoffice node_modules .node-gyp .npm ipynb_checkpoints dist-packages site-packages .eggs build help icons modules samples Template Templates template templates snapd locale .pycharm_helpers pycharm_helpers .google-chrome google-chrome __pycache__ pack generated_completions .cargo"
PRUNEPATHS="/tmp /var/spool /media /var/lib/os-prober /var/lib/ceph /home/.ecryptfs /var/lib/schroot /usr/share/man /usr/share/perl5 /usr/share/perl /usr/share/doc /usr/share/sound /opt/pycharm-professional"
PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs devtmpfs fuse.mfs shfs sysfs cifs lustre tmpfs usbfs udf fuse.glusterfs fuse.sshfs curlftpfs ceph fuse.ceph fuse.rozofs ecryptfs fusesmb"
[Unit]
Description=Update locate database
[Service]
Type=oneshot
ExecStart=/usr/bin/updatedb
IOSchedulingClass=idle
[Unit]
Description=Update locate database
[Timer]
OnStartupSec=5m
OnUnitInactiveSec=1h
[Install]
WantedBy=timers.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment