locate
is a command I’ve used in the past, but now, fresh installed with sudo apt get locate
it doesn return anything.
locate --version
returns
locate (GNU findutils) 4.10.0
, from 2024
or, have I forgotten something?
locate
is a command I’ve used in the past, but now, fresh installed with sudo apt get locate
it doesn return anything.
locate --version
returns
locate (GNU findutils) 4.10.0
, from 2024
or, have I forgotten something?
locate
uses an index you need to update usingupdatedb
before it is able to find anything.updatedb
may run periodically because of a cron job, but the index is probably missing right after installing it manually.Why don’t filesystems maintain such a database so you don’t have to spend cycles on a file indexer ?
I guess because that adds extra complexity that isn’t inherently necessary and can be added on top, plus it eats resources. You’ll spend the cycles either way basically, at least this way it’s optional. I don’t bother with a file indexer because with SSDs nowadays,
find
is pretty fast, and how often do you search for files anyway?Linux has APIs to get notified on file system events (fanotify, inotify) which would allow such a service to update itself whenever files are created/delete immediately, but
locate
is way older than that, from the 80s. I think popular DEs have something like that.There’s also ways to search for specific files that come with packages (e.g.
dpkg -S
), because the package manager already maintains an index of files that were installed by it, so you can use that for most stuff outside/home
.I search for files dozens of times per day, it’s largely how I navigate between folders.
And often advanced searches like only this root folder, in reverse order of accessed time, or only folder
On windows I use void tools everything but nothing like it compares in speed and ease of use on linux.
It’s one of my many roadblock to transition to linux.
You might like fd. And bat. And generally awesome shell.
Sounds good, I’m searching for a good shell function and alias repository
Please tell if you find one, i would like to contribute.
I wonder if the helper-scripts would allow something like that or if they’re proxmox scripts only ?
Seems like a good and useful workflow for sure. Don’t know if something equivalent exists, maybe it doesn’t.
I’d personally use
find
for this, but it is a command line tool, and while I have memorized some of the more common options (directories-only would be-type d
for example), I’d have to look at the manpage for more advances options. It’s not hard exactly but it’s not easy-to-use GUI software for sure.I’ve taken to using chatgpt to make me the more advanced find queries, before on linux I would ONLY use
find /path | grep -i somenames
So that’s already an improvement, if still a bit tediousThe thing about everything is that it’s so ergonomic, fast and powerful.
Being able to search anything and sort everywhich way with the click of a button
Check out this sublime search syntax (this not even half of it ! )
And the re-ordering by columns, and there are just SO MANY columns you can add, like search by EXIF camera exposure, no problem !
I really wish there was something as good as “everything” on linux, it’s just awesome.
Oh that’s pretty cool! I does seem like a shame to not have something like that on Linux.
Maybe it could run on something like wine ? But if there’s not something like… whatever it is that thing that makes WizTree faster than WinDirStat, then it would probably work in a very slow compatibility mode
Maybe? It’ll almost certainly be worse (or not work at all maybe) than on Windows.
They do. You look at it every time you see the contents of your disk. It’s just organised in a tree to make path based lookups fast and locate organises its database differently to make fast basename lookups.