2

For instance, I don't want either program to find files that end in *.pyc. I'm sure I can do this somehow using regexes or globs, but is there a way to make locate just ignore the files altogether? It's highly doubtful that I would ever want to search for a pyc file.

1 Answer 1

9

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"

1
  • 2
    As it turns out, PRUNENAMES only works for directories, not for file names. Nov 17, 2009 at 15:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .