|
|
Subscribe / Log in / New account

What goes into default Debian?

What goes into default Debian?

Posted Feb 17, 2021 23:28 UTC (Wed) by clump (subscriber, #27801)
In reply to: What goes into default Debian? by Sesse
Parent article: What goes into default Debian?

The -iname flag for GNU find will do case-insensitive searches. Just in case you didn't know about it.

I like the ease of locate but switched to find years ago because find is always up to date.


to post comments

What goes into default Debian?

Posted Feb 18, 2021 6:12 UTC (Thu) by dowdle (subscriber, #659) [Link]

locate shouldn't be more than 24 hours out of date... and if you are looking for something more recent, you most likely created it and it's in your home directory... and you can find it quickly enough. But for the vast majority of the filesystem outside of your home directory, locate smokes find.

If I've done a lot of package installs or updates... I'll often run updatedb before using locate. The updatedb action usually only takes a second or two. So making locate as up-to-date as find, is still way, way faster than find.

Yes, there are feature differences because locate only matches file/dir names whereas find has a whole slew of properties you can search for. It does NOT need to be an either or... or one is better than the other. Use both, they are both great.

What goes into default Debian?

Posted Feb 18, 2021 7:29 UTC (Thu) by anton (subscriber, #25547) [Link] (3 responses)

"rlocate is an implementation of the ``locate'' command that is always up-to-date." Except that rlocate itself is not up-to-date; it was written before inotify/fanotify, so it uses its own kernel module instead. But maybe one of the current locate implementors can add an always-up-to-date feature based on fanotify.

It's funny that some people argue that updatedb is too costly while others argue that "find /" (which costs hardly less) is fast enough.

What goes into default Debian?

Posted Feb 18, 2021 9:20 UTC (Thu) by smcv (subscriber, #53363) [Link] (2 responses)

It depends on how much you use it. Assume updatedb runs once a day, for example. If you run locate multiple times a day, then the daily updatedb is definitely "cheaper" than using find every time; but if you only run locate once a year, then you're reading the whole filesystem hierarchy 365 times as often as you need to.

What goes into default Debian?

Posted Feb 18, 2021 9:39 UTC (Thu) by anton (subscriber, #25547) [Link] (1 responses)

It also depends on how you value the user's time vs. the computer's time. However, on my personal system I indeed do not run updatedb automatically, because last time I did (long ago) it would run right on system startup (i.e., every morning) and make the system sluggish.

What goes into default Debian?

Posted Feb 18, 2021 9:44 UTC (Thu) by Sesse (subscriber, #53779) [Link]

While this is a valid concern, do note that updatedb in plocate is run with the “idle” I/O class, so it should get lower priority than your interactive use. (At least that's what the kernel claims!)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds