Date: Sun, 31 Mar 1996 22:00:10 +4000 (PST) From: Mike Pritchard <mpp> To: freebsd-hackers Subject: locate Message-ID: <199604010600.WAA01868@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
What do people think of the idea of changing locate & its database update script to keep a list of ALL files on the system, and not just those that can been seen by the world. It always drives me nuts when I use locate to find something I *KNOW* is on my system, but it would not print it because it is in some directory that is mode 750, and not 755, but it is still accessable by my current uid/gid. Locate would then have to be updated to stat each match it finds first before printing it, but I think for most typical locate runs, the performance penalty would be negligble. I know that my typical locate runs usually come up with less than a pageful of matches, and stat'ing each one of those is much better than my running "find / -name xyzzy -print". This also provides the benefit is not listing files which have been removed from the system since the database was updated. Another option is to keep two databases, one of all the public files, as it does now. And a complete database that is accessed with some new option on locate that would verify that the file is accessible to the user before printing it out. Comments?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604010600.WAA01868>