Interview Prep/Linux/Filesystem Hierarchy, Inodes & Links

What is the difference between `find` and `locate`?

BeginnerConceptFilesystem Hierarchy, Inodes & Links
Answer

find walks the filesystem live, so it is accurate but slower, and supports rich predicates. locate (mlocate/plocate) searches a prebuilt database updated by updatedb, so it is instant but can be stale.

find /var/log -name '*.log' -size +100M -mtime -1
find / -xdev -perm -4000 -type f 2>/dev/null
All Linux questions Roadmap: Linux

More on Filesystem Hierarchy, Inodes & Links