Getting ready

Besides having a terminal open, these two utilities need to be installed:

$ sudo apt-get install patch diff

Next, let's create a fake configuration file that's copied from a real one:

$ cp /etc/updatedb.conf ~/updatedb-v2.conf

Open updatedb-v2.conf and change the contents to look like this:

PRUNE_BIND_MOUNTS="yes"# PRUNENAMES=".git .bzr .hg .svn"PRUNEPATHS="/tmp /var/spool /media /home/.ecryptfs /var/lib/schroot /media /mount"PRUNEFS="NFS nfs nfs4 rpc_pipefs afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre tmpfs usbfs udf fuse.glusterfs fuse.sshfs curlftpfs ecryptfs fusesmb devtmpfs"

In the event that your updatedb-v2.conf looks drastically different, add /media /mount to the ...

Get Bash Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.