I'd like to configure locate to always exclude specific file types.
For example, I would like to exclude ".pyc" ".class" "~" etc.
This is a duplicate question from superuser.com:
In updatedb.conf, uncomment the PRUNENAMES line and add the extension .pyc. On my Ubuntu system by default it reads:
Change it to
Hideous hack though it may be, you could always use grep:
locate foo | grep -v ".pyc$" | grep -v ".class$"
and chain as necessary.