File Search Tools plocate, fd, ripgrep, mdfind

Installed 2026-05-01 on hpve, CT100, and Mac Studio. Replaces slow find / -name pattern walks with indexed lookups and parallel filesystem walkers.

What's installed where
Tool hpve CT100 Mac Studio Purpose
locate (plocate) โœ… โœ… โŒ (Spotlight off) Indexed filename search โ€” instant
fd (or fdfind on Debian) โœ… โœ… โœ… Real-time filename walker โ€” much faster than find
rg (ripgrep) โœ… โœ… โœ… Content search inside files
mdfind n/a n/a built-in (Spotlight disabled) macOS Spotlight CLI

On Debian/Proxmox the fd binary is named fdfind to avoid a name collision with another package. On macOS Homebrew installs it as fd.

updatedb index schedule

plocate rebuilds its index nightly via systemd timer.

Host Schedule Indexed paths
hpve 03:00 EDT daily /nvmepool, /mediapool (excludes /Biggest, /backups, /var/lib/docker, /var/lib/containerd, /var/lib/vz, /var/cache, /var/log, system paths)
CT100 07:00 UTC = 03:00 EDT daily /mnt/* mounts (excludes /mnt/kiwix, /var/lib/docker, /var/lib/containerd, /var/cache, /var/log, system paths)

Config at /etc/updatedb.conf. Timer override at /etc/systemd/system/plocate-updatedb.timer.d/override.conf. Initial run took ~41-53 seconds; subsequent updates are incremental.

To run a fresh index manually: sudo updatedb.

Quick reference

Filename search (instant, uses indexed DB)

locate TASKS.md                   # all matches anywhere
locate -c .mp3                    # count matches only
locate /nvmepool/music            # all paths under one tree
locate -i README                  # case-insensitive
locate -r '\.docker-compose\.ya?ml$'  # regex
fd pattern /path                  # macOS โ€” basic search
fdfind pattern /path              # Debian โ€” same, different name
fd -e mkv                         # all .mkv files
fd -t d node_modules              # directories named node_modules
fd -H pattern                     # include hidden files
fd -I pattern                     # ignore .gitignore
fd --max-depth 3 pattern          # limit depth

Content search inside files

rg "TODO" /path                   # find text
rg -i "error" /var/log            # case-insensitive
rg --type yaml "image:"           # only yaml files
rg --type-list                    # see all known types
rg -l "pattern"                   # only print filenames
rg -B 2 -A 5 "pattern"            # 2 lines before, 5 after match
rg --hidden                       # search hidden files

macOS Spotlight (when re-enabled)

mdfind "TASKS"                                  # Spotlight search
mdfind -onlyin /Users/bee/Sync TASKS            # scoped to one folder
mdfind "kMDItemDisplayName == '*music*'cd"      # case-insensitive contains
mdfind "kind:pdf modified:today"                # rich queries
mdutil -s /                                     # check indexing status
sudo mdutil -i on /                             # re-enable indexing
Which tool when
  • Looking for a file by name on Linux: locate โ€” sub-second, but up to 24h stale
  • Looking for a file you just created: fd โ€” real-time, ignores nothing important
  • Looking for text inside files: rg โ€” fast, knows file types, ignores binary
  • Looking on macOS: fd for files, rg for content. mdfind only if Spotlight is on
  • Filenames with special characters: prefer fd over locate (regex feels nicer)
Status as of install
  • hpve: 41-second initial index of nvmepool + mediapool. locate -c container-data returns 778,550 matches in 2.25 seconds. Working.
  • CT100: 53-second initial index. locate seedbox-sync.sh returns instantly. Working.
  • Mac Studio: fd and rg installed. Spotlight indexing is disabled at the volume level โ€” mdutil -s / reports “Indexing disabled.” mdfind returns no results until Spotlight is re-enabled with sudo mdutil -i on /. fd works fine without it.