Hi,

On Sat, May 16, 2026 at 02:06:57PM -0400, [email protected] wrote:
> Is there any validity to the idea that find is harder on disks (hits them 
> more 
> often / more widely) than locate?

I think it depends upon perspective and context.

I personally do not install locate because I don't see the point of
updatedb walking my entire storage once a day just in case I maybe want
to find some files. From my perspective updatedb "hits harder" than my
typical use of find.

But, a find across the whole file tree from / is going to be similar to
updatedb updating its locate database.

I think you have to ask yourself what you are actually concerned about.
On flash storage the walk of the file tree should be fairly fast and
it's only read operations so it won't contribute to wear, so it doesn't
matter; do whatever you prefer.

On rotating media the operation is quite expensive and can seriously
slow down other tasks. A typical HDD strugglers to do 100 IO operations
per second, and a metadata walk is just slamming the drive(s) with
those.

I disable updatedb (by not installing locate at all) because if I
did allow updatedb to run it would have noticeable effect on performance
of other things, and I don'#t like that. If I want to use find on a big
file tree on a HDD-based system then at least I know what I'm in for and
can make the choice.

But it's still just read operations. It's not going to harm anything. So
again, if you don't notice a problem with updatedb running then it
doesn't matter - use what you like best.

Personally I also don't like that the results of locate will be out of
date. I would really rather get accurate answers from find every time.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

Reply via email to