Hi,
I'd like to configure locate to always exclude specific file types.
For example, I would like to exclude ".pyc" ".class" "~" etc.
From serverfault
-
look at
/etc/updatedb.conf
From Casual Coder -
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:
# PRUNENAMES=".git .bzr .hg .svn"
Change it to
PRUNENAMES=".git .bzr .hg .svn .pyc"
-
Hideous hack though it may be, you could always use grep:
locate foo | grep -v ".pyc$" | grep -v ".class$"
and chain as necessary.
From MadHatter
0 comments:
Post a Comment