Click to See Complete Forum and Search --> : Finding files seems slow


Linuxneophyte
07-20-2001, 03:09 PM
Searching for files in a windows manager, or with the find command at a terminal seems unusably slow. Is there anyway to speed it up? Could you maybe put a list of all your files and directories in a text file, and then search through that faster?

Ig0r
07-20-2001, 03:22 PM
There is already a set of programs that does just that.
The "updatedb" command updates the file database with your current filesystem state, and the "locate" command searches that database.

Linuxneophyte
07-20-2001, 04:02 PM
You know what the command to update is in FreeBSD? updatedb doesn't work, so's do I have to install some software for that. I tried the locate command. And it says "database too small: /var/db/locate.database". So there's nothing in the database. Could I do a find * (or really just /usr) >> /var/db/locate.database. And then use locate? Or should I find a program that'll do that automatically.

Gnu/Vince
07-20-2001, 04:07 PM
I normally narrow down the search path. If I'm looking for something related to vim syntax files:

find /usr/share/ -name '*vim*' -print

Malakin
07-21-2001, 07:40 AM
I've never used freebsd but here's a guess, does this exist for you?
/usr/libexec/locate.updatedb
if so run it and it will update your locate database.