Linux locate command database

during my last node migration i misplaced some vhdd and thus wanted to use the locate command, so i was installing that and well doesn’t seem like that will get done anytime soon trying to index all the storagenode files…

was trying to figure out how i configure locate to ignore the storagenode folders, but not having much luck…

did purge locate, which seems to have stopped it in trying to index the storagenode folders, would be real nice to be able to use locate tho.

anyone got any clue about how i would do something like that?

Any reason you can’t use the find command? There are many examples on how to exclude directories.

locate builds a database, so it’s faster at search time.

Seems to me like this is a one time search though.

locate builds its database at some pre-scheduled time, so you don’t need to wait until it gets built.

i was trying to use find but didn’t really seemed to work across different zfs datasets or something…

and locate seemed useful, i often run searches so having a db of my files would make good sense, so willing to spend a little time now to save a lot of time later when waiting for searches to finish.

maybe ill give the find thing another go…

1 Like

lol i didn’t use the -name parameter on find… which meant well that i got all kinds of junk popping up…
not sure why default is to search all data rather than searching for filenames… seems like files are usually what one would be looking for… and also if a default find command is a search through everything… wouldn’t that just take an awful amount of time also… so yeah just me being very green at linux… still think it would be better if i could get locate to work… takes a long time to search through 20TB

would be nice with a database