Developer Tools
Find Command Builder
Build a Linux find command from a form: path, name patterns, type, size, mtime, depth, prune, and print or exec actions. Live output with explanations.
Find command builder
Common recipes
Click a preset to start from a working pattern, then tweak.
The directory find walks. Use . for the current directory, ~ for your home directory, or any absolute path like /var/log.
File type
Name patterns
Glob patterns. Use * and ?. Multiple patterns are joined with -o (OR). Negated rows turn into ! -name PATTERN and join with AND so they always exclude.
find counts days as full 24-hour units since now. For -mtime +30, the file's mtime is more than 30 days ago.
Other filters
Each entry becomes a -name in a prune group. They match by basename anywhere in the tree.
Action
Command
find . -type f -name '*.txt' -print
Explanation
Each flag, in order, with what it does.
.Start the walk from the current working directory.-type fOnly regular files. Symlinks, directories, and special files are skipped.-name '*.txt'Match every entry whose basename matches '*.txt' case-sensitively. Glob characters * and ? are interpreted by find, not the shell.-printPrint each match on its own line. This is the implicit default but listing it explicitly keeps prune blocks reading correctly.
Notes
- The command is single-quoted where it matters so the shell does not expand globs before find sees them.
- Test destructive runs with -print first. Once the list looks right, swap to -delete or -exec rm.
- BSD find on macOS supports most of these flags but lacks -mmin in older versions and parses -delete strictly; prefer -exec rm for portability.
- For paths with spaces, pipe into xargs -0 with -print0.
How to use
- Pick a recipe from the presets, or start from scratch.
- Set the start path, pick the file type, and add one or more name or path patterns. Toggle case insensitive, full-path matching, or exclude as needed.
- Add filters: size with a unit and comparator, modification time in days or minutes, empty-only, min and max depth, and any directories to prune (node_modules, .git, or custom names).
- Choose the action: print, null-separated print, delete, exec rm, exec chmod with an octal mode, or a custom exec command using the {} placeholder.
- Read the live command and the per-flag explanation, then copy. Always run with -print first before switching to -delete or -exec rm.
About this tool
Find Command Builder turns the GNU find(1) flag soup into a form. Pick a starting directory, choose a file type, add as many glob name or path patterns as you need (case sensitive or insensitive, basename or full path, positive matches OR'd together and negated matches AND'd as excludes), filter by size with bytes, KB, MB, or GB, filter by modification time in days or minutes with newer-than / older-than / exact comparators, cap depth with -mindepth and -maxdepth, prune common heavy directories like node_modules and .git plus any extra basenames you list, then pick the action: -print, -print0 for safe pipelines into xargs -0, -delete, -exec rm -- {} +, -exec chmod with an octal mode, or your own custom -exec command with the {} placeholder using either \; (one run per file) or + (batched). The right column shows the live command, a per-flag explanation in order, and warnings for things that bite in practice: unsafe / start paths, missing chmod modes, custom commands missing {}, BSD-versus-GNU portability gotchas. Quoting is shell-safe: glob characters live inside single quotes so the shell does not expand them before find runs, and the start path keeps tilde unquoted so ~ expands to your home directory. Useful for cleaning up logs, finding space hogs, locating recent downloads, normalizing permissions across a tree, finding empty directories, building safe pipelines, or just remembering the order of flags. The tool never executes the command; it only generates the text. Always test destructive runs with -print first.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Crontab Explainer
Translate any crontab to plain English with a field breakdown and next-run preview.
Open tool
DeveloperChmod Calculator
Convert chmod values between octal, symbolic (rwxr-xr-x), and clickable owner, group, and other checkboxes.
Open tool
DeveloperGlob Pattern Tester
Test glob patterns and negations against file paths with live results.
Open tool
DevelopercURL Command Builder
Form-driven builder that emits curl, PowerShell, HTTPie, wget, fetch, and raw HTTP/1.1.
Open tool
DeveloperBulk File Renamer
Pattern-based batch rename with sequential numbering, regex, and a copy-ready script.
Open tool
DeveloperGitignore Generator
Build a .gitignore from curated language, framework, editor, and OS templates.
Open tool