Ray's Knowledge Base
Unlock

Never search the whole disk from the root folder Stale

Stale: Ran `find / -name patch.c` scanning the whole disk when the vendored libgit2 source was already known to be under ~/.cargo/registry/src/libgit2-sys-0.18.8+1.9.7/libgit2/

PreferenceVerified 27 Sep 2026Holds anywhere
Preference. A rule, why it holds, and how to apply it.

Rule#

Do not run find / or other searches that start at the root folder. Search only the folders where the thing can be, for example the tool's install folder under the home folder.

Why#

The user stopped a find / ... search: it is slow, reads far more than needed and touches the whole machine.

How to apply#

First look at the launcher or the install folder (for example read the launcher script, or ls the tool's folder under ~), then search only there. When the location is unknown, ask the user.

Also found by searching

  • the agent started searching the entire filesystem to locate where a tool is installed
  • how should I find where a CLI tool is installed without scanning the whole disk?
  • locate binary install folder: whole-disk find from root is too slow, check the launcher script instead
  • how do I locate where a CLI tool is installed without scanning the whole filesystem?
  • agent ran a search from root directory and was interrupted, where should it look instead
  • searching entire disk for a config or binary on macOS is slow, best approach