bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

limiting updatedb to files


From: Karl Berry
Subject: limiting updatedb to files
Date: Fri, 11 Aug 2006 08:59:52 -0500

Hi James and all,

I'd like to limit updatedb to indexing files, or at least not index
symlinks.  However, the way the script is written, I don't see a way to
make it happen.  Using --findoptions='-type f' puts that at the
beginning of the eventual find command (findutils 4.2.28, GNU/Linux, not
that it matters), so updatedb executes

find / -type f '(' -fstype nfs ... ')' -prune -o -print0

which of course makes the prune ineffective, as far as I can see.

So I wonder about adding yet another option/envvar to allow prepending
args before the -print[0]?  --printoptions?  --afterprune?

Another way (not mutually exclusive) would be to add a general
--pruneoptions, and stick in its value just before the closing ')'.
Then  updatedb --pruneoptions='-type -l -o -type d'  would get the job
done well enough.  I've wanted to specify general pruning in other
circumstances too.


BTW, the Invoking updatedb node could use some examples :).  It also seems
like a lot of that node could be usefully included in the --help output.

Thanks,
Karl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]