How to Find Files on Linux: find, locate, fd and the Modern Toolkit
Last updated: · written by the FileLocator team
Linux doesn't have one file search — it has a toolbox, and knowing which tool to grab is the whole game. The classic answer to "linux find files" is the find command, and it's still the most capable; but the modern stack — fd for names, ripgrep for contents, fzf for fuzzy everything — is faster to type, faster to run, and kinder to your eyes. Add plocate for instant lookups, your desktop's built-in indexer, and Recoll when you need real full-text search over PDFs and documents, and nothing on your disks stays lost.
Every command below is copy-paste ready. This page is the hub for Linux search on this site; the guides it links go deeper on each technique.
the classic
find: the essentials
find walks the file system live, which means it's always accurate and needs no index — and it can filter on practically any file attribute, then act on what it finds. The patterns you'll actually use:
# Every PDF anywhere under your home directory
find ~ -name '*.pdf'
# Same, but case-insensitive (catches .PDF, .Pdf)
find ~ -iname '*.pdf'
# Files over 100 MB — the "where did my disk go" query
find ~ -size +100M
# Files modified in the last 7 days
find ~ -mtime -7
# Combine: big videos changed this week, in one folder tree
find ~/Videos -iname '*.mkv' -size +500M -mtime -7
# Act on results: long-list every match
find ~ -name '*.log' -size +50M -exec ls -lh {} \;
# Delete with confirmation (safer than -delete)
find /tmp -name '*.tmp' -ok rm {} \;
Three details worth knowing: quote your patterns ('*.pdf') so the shell doesn't expand them early; -mtime -7 means "less than 7 days ago" while -mtime +7 means "more than"; and 2>/dev/null on the end silences the permission-denied noise when searching from /. For date-based hunting in depth — including the equivalents on Windows and macOS — see our guide to finding recently modified files, and for space audits, finding large files.
instant answers
locate and plocate: trade freshness for speed
Where find scans live, locate queries a prebuilt database of every path on the system — so it answers in milliseconds, even across millions of files. Most current distributions ship plocate, a drop-in successor that's faster still and builds a smaller database.
# Install on Debian/Ubuntu
sudo apt install plocate
# Find any path containing "invoice", instantly
locate invoice
# Case-insensitive, and count matches
locate -i invoice
locate -c '*.iso'
# Refresh the database right now (otherwise it's a daily cron/timer job)
sudo updatedb
The trade-off is freshness: the database only knows what existed at the last updatedb run, typically once a day. A file you created an hour ago is invisible to locate and a file you deleted this morning still shows up. The practical workflow: locate first because it's instant, fd or find when the file is new or locate comes up empty. (This freshness-vs-speed trade-off is the core concept behind every indexed search tool — the glossary entry on indexing explains it platform by platform.)
the new school
The modern trio: fd, fzf and ripgrep
fd — find with sane defaults. fd does what find does for the common cases, with a fraction of the typing: smart-case matching, colored output, parallel traversal, and it skips hidden files and anything in your .gitignore by default (use -H and -I to bring them back).
# Everything matching "report" under the current directory
fd report
# By extension, under a specific folder
fd -e pdf . ~/Documents
# Changed in the last day, over 10 MB
fd --changed-within 1d --size +10m
# Run a command on every match, in parallel
fd -e jpg -x convert {} {.}.webp
fzf — fuzzy-find anything, interactively. fzf turns any list into a live, type-to-filter picker. With its shell bindings installed, Ctrl+T fuzzy-finds a file path into your current command line and Ctrl+R replaces your shell history search with something dramatically better. Type fragments — invrep24 finds invoices/report-2024.pdf.
# Pipe anything into an interactive picker
fd -e md | fzf
# Open the picked file in your editor
nvim "$(fzf)"
ripgrep — contents, not names. When the question is "which file contains this text," rg is the answer: recursive, gitignore-aware, and in our testing the fastest content grep available on any platform.
# Case-insensitive phrase search through a folder tree
rg -i "quarterly forecast" ~/Documents
# Only in Python files; show 2 lines of context
rg -t py "def main" -C 2
# Literal string (no regex interpretation)
rg -F "total: $99.95"
# Filenames only, including files rg would normally skip
rg -l --no-ignore "TODO"
rg takes full regular expressions, which is where it really earns its keep — our regex file search guide has ten copy-paste patterns that work in ripgrep, grepWin and most GUI tools. The caveat: like all grep-family tools, ripgrep reads plain text — it can't see inside PDFs or office documents. For those, skip ahead to Recoll.
cheat sheet
find vs locate vs fd at a glance
| find | locate / plocate | fd | |
|---|---|---|---|
| How it works | Live file-system walk | Prebuilt database (updatedb) | Live walk, parallelized |
| Speed on a big tree | Slow (seconds–minutes) | Instant (milliseconds) | Fast (often seconds) |
| Sees brand-new files | Yes, always | No — waits for next updatedb | Yes, always |
| Filters | Name, size, dates, type, permissions, owner, depth… | Path pattern only | Name/regex, extension, size, dates, type |
| Act on results | -exec, -ok, -delete | Pipe to xargs | -x / -X (parallel) |
| Installed by default | Yes, everywhere | Usually (or one package away) | No — install it |
| Best for | Complex criteria, scripts, servers | "Where is that file?" lookups | Day-to-day interactive use |
point and click
Desktop search: GNOME, KDE and beyond
GNOME Files + Tracker. GNOME's search (press the Super key and type, or Ctrl+F in Files) is backed by Tracker (now "TinySPARQL"), which indexes filenames and the contents of common document formats in your home directory. It's quietly decent: search from Files, filter by type and date from the dropdown, and results include content matches. Control what gets indexed under Settings → Search.
KDE Dolphin + Baloo. Dolphin's search box (Ctrl+F) rides on Baloo, KDE's indexer — famous mostly for the times it eats CPU. To tame it: System Settings → Search → File Search, switch from "Also index file content" to filename-only indexing (vastly lighter), and exclude build folders, VM images and caches. From a terminal, balooctl status shows progress, balooctl purge && balooctl enable rebuilds a corrupt index, and balooctl disable ends the relationship.
Desktop-agnostic GUIs. Catfish is a lightweight search window (a XFCE staple, runs anywhere) that wraps locate and live scanning with date/type filters — handy when you want clickable results without a heavyweight indexer. ANGRYsearch is the closest thing Linux has to the Windows tool Everything: it databases every filename and filters as you type, with the same freshness caveat as locate. If you've used Everything on Windows, ANGRYsearch will feel immediately familiar — and our free file search tools roundup puts the cross-platform picture together.
One more GUI-era problem worth naming: searching network shares. Whether it's a Samba server or a NAS, indexing rarely reaches across the wire — the options and trade-offs are covered in our network drive search guide.
full-text
Recoll: real full-text search for documents
Everything above searches filenames or plain text. The missing piece is full-text search across PDFs, LibreOffice and Word documents, and email — and on Linux that piece is Recoll. It builds a Xapian index of your chosen folders, using per-format filters to extract text from dozens of document types, then gives you ranked results with snippets, boolean and phrase queries, and proximity search. First indexing of a big document library takes a while (plan for a coffee, not a lunch, on an SSD); after that, incremental updates are quick and queries are instant.
Install it from your distribution's repositories (sudo apt install recoll on Debian/Ubuntu), point it at your document folders on first run, and add the optional helper packages it suggests for PDF and Office extraction. One caveat that applies to every tool on every platform: scanned PDFs are pictures of text and need OCR before anything can search them — our PDF search guide covers that workflow.
If you live across operating systems, the open-source DocFetcher (Java-based, runs on Linux, Windows and macOS) does a similar content-indexing job with a portable index you can carry between machines — we've reviewed it in full. And for one quick, no-install job — checking a single folder for duplicates or oversized files — our free in-browser File Finder tool works on Linux like everywhere else, with nothing uploaded.
DocFetcher review
Open-source full-text indexing that runs on Linux — our hands-on verdict.
Regex file search
Ten copy-paste patterns that work in ripgrep, grep and GUI search tools.
Best free file search tools
The strongest no-cost search tools across Linux, Windows and macOS.
questions
Linux file search FAQ
What is the fastest way to find a file by name on Linux?
If the file existed before the last database update, locate (or its faster successor plocate) wins: it queries a prebuilt database and answers in milliseconds. For files created in the last few hours, use fd or find, which scan the live file system and therefore always see current state. A good habit is plocate first, fd when plocate comes up empty.
What is the difference between find, locate and fd?
find scans the file system live, so it is always accurate but slower, and it can filter on almost anything: size, dates, permissions, type, then act on results with -exec. locate/plocate searches a database built by updatedb, so it is nearly instant but only as fresh as the last update, typically daily. fd is a modern live scanner like find with friendlier syntax, colored output, parallel traversal, and it skips hidden and .gitignore'd files by default.
How do I search inside file contents on Linux?
For code and plain text, ripgrep (rg) is the standard: rg -i "phrase" ~/Documents searches recursively, case-insensitively, and respects .gitignore. For documents with formatting, such as PDFs and LibreOffice or Word files, plain grep tools cannot see the text; use Recoll, which builds a Xapian full-text index with format filters, or the cross-platform DocFetcher.
Why is Baloo using so much CPU or disk on KDE?
Baloo, the KDE file indexer, defaults to indexing file contents across your home directory, and its first full crawl is heavy. Tame it in System Settings under Search by switching off content indexing (filename indexing alone is much lighter) and excluding build directories, caches and other churn-heavy folders. balooctl status shows what it is doing; balooctl purge followed by balooctl enable rebuilds a corrupted index; balooctl disable turns it off entirely.
Is there an Everything-style instant search for Linux?
The closest is ANGRYsearch, which deliberately imitates Everything: it builds a database of every filename and returns results as you type. The difference is freshness — NTFS lets Everything monitor changes in real time, while ANGRYsearch relies on periodic database updates, so very new files will not appear until the next update. Combining plocate for instant lookups with fd for fresh ones gets you most of the way in a terminal.
Want the full cross-platform picture?
Our master roundup ranks 10 search tools across every OS — indexing approach, regex support and real-world speed.
keep exploring
Related reading
Find recently modified files
find -mtime, fd --changed-within, and the GUI equivalents on every platform.
Search network drives
SMB shares, NAS boxes and mapped drives — what indexes, what crawls, what works.
File search glossary
Index, regex, boolean operators, metadata and 30+ more terms in plain English.