• notabot@lemm.ee
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    2 months ago

    find can be a bit slow because it enumerates every directory recursively from the root you specified, but it let’s you do a lot more than just search by name. locate is available on most distros and give fast results, albiet from when the index was last rebuilt (usually nightly). They both have the vital property that they output a list of files to stdout for further processing.

    • ObsidianZed@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      2 months ago

      It’s worth mentioning you can manually kick off an index build with I believe updatedb (in most cases).

    • Tja
      link
      fedilink
      arrow-up
      3
      ·
      2 months ago

      +1 for locate and updatedb. It works on macos too.