logo
search
list

Table of Content

Basic Syntax of the Linux find Command
Most Practical File Search Examples
Targeted Folder Search vs Full System Search
Common Errors and Quick Fixes
Graphical Alternatives (Including WPS for Office Files)
FAQ
Conclusion
Free Office Download

Linux Find File: find Command by Name Guide

Posted by Algirdas Jasaitis

calendar

2026-07-27

views

871

likes

4

How to find files in Linux is a core skill for new users who feel lost after leaving Windows File Explorer. The built-in find command is the most flexible native search tool—once you know a few safe patterns. This beginner guide covers practical find examples, targeted vs full-disk search, common errors, and an easier graphical option for office documents with WPS Office on Linux.

Use Word, Excel, and PPT for FREE
How to find files in Linux beginner guide with find command
How to find files in Linux beginner guide with find command


Quick answer: Search your home folder first: find ~ -iname '*report*'. Limit by type with -type f (files) or -type d (folders), by size with -size +1G, or by time with -mtime -7. Prefer a specific path over /. Use -iname for case-insensitive matches. Avoid -delete until you have previewed results.

Basic Syntax of the Linux find Command


Linux find command syntax directory tests and actions
Linux find command syntax directory tests and actions


find [search_directory] [tests...] [actions...]
PartMeaningBeginner tip
search_directoryWhere to start (for example ~, ~/Documents, /)Start with ~, not the whole disk
testsFilters such as name, size, type, or timeCombine only what you need
actionsOptional follow-ups (-print, -delete, -exec)Default is to print matches—preview before delete

Quotes matter. Patterns with * should usually be wrapped in single quotes so the shell does not expand them early: -name '*.pdf'.

Most Practical File Search Examples


Search Linux files by name with find -name and -iname examples
Search Linux files by name with find -name and -iname examples


1. Search by full or partial name

# Case-sensitive name match (exact filename)
find ~/Documents -name 'report.docx'

# Partial match: names containing “report”
find ~/Documents -name '*report*'

# Case-insensitive partial match (recommended for beginners)
find ~/Documents -iname '*report*'


Filter Linux find results by file type size and modification time
Filter Linux find results by file type size and modification time


2. Filter by file format (extension)

# All PDFs under your home folder
find ~ -type f -name '*.pdf'

# PDFs or Word docs (group the OR conditions)
find ~ -type f \( -name '*.pdf' -o -name '*.docx' \)

Use *.pdf / *.docx—not .pdf alone—or you will miss normal files.

3. Find large files by size

# Files larger than 1GB (start in home to stay safer/faster)
find ~ -type f -size +1G

# Full-disk scan (slower; may show Permission denied without sudo)
find / -type f -size +1G 2>/dev/null

4. Filter by modification time

# Modified within the last 7 days
find ~ -type f -mtime -7

# Not modified in the last 30 days
find ~ -type f -mtime +30

-mtime -7 means “less than 7 days ago.” -mtime +7 means “more than 7 days ago.”

5. Search folders only or files only

# Directories only
find ~ -type d -iname '*project*'

# Regular files only
find ~ -type f -iname '*project*'

Targeted Folder Search vs Full System Search


Targeted home folder find versus full disk Linux search
Targeted home folder find versus full disk Linux search


ApproachExampleWhen to use
Targeted (recommended)find ~ -iname 'budget.xlsx'Faster, fewer permission errors, everyday use
Project folderfind ~/Documents -name '*.pptx'You already know the rough location
Full diskfind / -name 'hosts'System files; expect delays and denied paths

~ is your home directory. / is the entire filesystem root. Full-disk searches take longer and often print Permission denied for protected system folders—that is normal without elevated access.

Common Errors and Quick Fixes


Common Linux find command errors and quick fixes
Common Linux find command errors and quick fixes


ProblemWhat to try
Permission deniedSearch under ~ first; or hide noise with 2>/dev/null; use sudo only when you truly need system paths
No resultsCheck spelling/path; try -iname; confirm wildcards like '*.pdf'; verify the file still exists
Shell expands *Quote patterns: -name '*.docx'
USB files missingMount the drive, then search the mount path (often under /media/$USER/ or /run/media/$USER/)
Accidental deletesNever start with -delete—run a print-only search first


https://res-academy.cache.wpscdn.com/upload/seo-engine-admin/2026-07-27/04e50b010f9b7269c47e8e41607ff2da.png


# Preview matches first
find ~/Downloads -type f -name '*.tmp'

# Only after you verify the list (destructive—use with care)
find ~/Downloads -type f -name '*.tmp' -delete

Graphical Alternatives (Including WPS for Office Files)


Open and search office files in English WPS Office on Linux
Open and search office files in English WPS Office on Linux
100% secure

If you prefer not to use the terminal for everyday hunting:

  • Files (GNOME) / Dolphin (KDE): use the window search box inside a folder.

  • locate (if installed): fast name index after the database is updated—great for quick lookups, less flexible than find for size/time filters.

  • WPS Office for Linux: handy when you mainly need Word, Excel, or PowerPoint files. Open WPS and use its file/open recent/search workflow to jump to office documents without memorizing find flags. Core editing features are free for personal use, with strong compatibility for common Microsoft Office formats.

Tip: Use find for system cleanup and precise filters; use WPS or your file manager when you just need that report.docx from last week.

Related Linux file management guides: linux create file; linux copy file; linux move file; linux rename file; linux delete file; remove directory linux; linux size of directory; linux zip folder; linux unzip.

FAQ

Does find distinguish uppercase and lowercase?

Yes by default with -name. Use -iname to ignore case: find ~ -iname '*readme*'.

Can I delete files directly with find?

Yes—with -delete or -exec rm—but it is easy to wipe the wrong files. Always run the same command without delete first and read the output carefully.

Why can’t find see files on a USB drive?

The drive must be mounted. Search the mount point (check your file manager sidebar path), for example find /media/$USER/USBNAME -iname '*.pdf'.

What is the difference between find and locate?

find walks directories in real time and supports rich filters. locate queries a prebuilt index and is often faster for simple name searches, but results can be slightly stale until the index updates.

Conclusion

To find files in Linux, learn a few find patterns: start in ~, match with -iname '*text*', narrow with -type, -size, and -mtime, and quote your wildcards. Prefer targeted folders over full-disk scans. Preview before -delete. For daily office documents on Linux, WPS Office offers a simpler graphical path alongside the terminal when you do not need advanced filters.

Free Office Download

WPS Writer
WPS Presentation
WPS Spreadsheet
WPS PDF
  • Use Word, Excel, and PPT for FREE, No Ads.

  • Edit PDF files with the powerful PDF toolkit.

  • Microsoft-like interface. Easy to learn. 100% Compatibility.

  • Boost your productivity with WPS's abundant free Word, Excel, PPT, and CV templates.

100% secure
Algirdas Jasaitis

15 years of office industry experience, tech lover and copywriter. Follow me for product reviews, comparisons, and recommendations for new apps and software.