How This find Command Builder Works
Fill in the filters you need, a name pattern or extension, a type (file, directory, or symlink), a depth range, a modified-time comparison, a size range, and this find command generator assembles a copy-ready command as you go, along with a plain-English explanation of what each flag does. Use it to build find command online output ready to paste straight into a terminal without digging through the find man page every time you need a filter you don't use often, or as a find command examples generator when you just want to see what a particular filter combination looks like. Both a single-line command and a multi-line, backslash-continued version are generated, so pasting into a shell script reads as cleanly as pasting into a one-off terminal command. This unix find command builder targets GNU find syntax, the version shipped with most Linux distributions.
Common find Filters Explained
Every filter toggled or filled in gets a one-line explanation printed alongside the generated command, but the table below is a quick find command syntax generator reference for the ones used most. Name and extension filters both compile down to a -name flag under the hood, since matching an extension is really just matching a *.ext glob. Size filters use find's own size suffixes (k, M, G) directly, so "100k" or "1M" in the size fields becomes -size +100k or -size -1M without any unit conversion needed.
| Filter | find flag | Meaning |
|---|---|---|
| Name pattern | -name "pattern" | Match files or directories by name, glob-style |
| Type | -type f / d / l | Restrict to files, directories, or symlinks |
| Min / max depth | -mindepth n / -maxdepth n | Limit how many directory levels deep the search goes |
| Modified newer/older than | -newer path / -not -newer path | Compare modification time against a reference file or timestamp |
| Min / max size | -size +n / -size -n | Match files larger or smaller than a given size |
| Empty | -empty | Match empty files or directories |
| Executable / readable | -executable / -readable | Match files with the given permission for the current user |
| Exclude path | -not -path "*/name/*" | Skip anything under a path containing the given substring |
Finding, Deleting, and Executing on Matches
The Action selector controls what find does with each match, beyond just printing it. Print (the default) and print0 (NUL-separated, safe for piping into xargs -0) just list matches. The ls action prints file details like ls -l. The exec action runs a custom command against every match, substituting {} for the matched path, useful for a find delete command builder scenario more targeted than the blunt -delete flag, or for batch operations like find exec command generator use cases such as recompressing or re-permissioning matched files. The delete action is the one to treat carefully: it permanently removes every matched file or directory with no confirmation prompt, always run the same filters with the default print action first to review exactly what would be deleted before switching the action to delete.
Common Uses
Finding every file with a given extension across a project, cleaning up log files older than a certain date, using a find files by size command to track down what's bloating a disk, and setting up a find command exclude directory filter for node_modules or .git so results aren't drowned in dependency noise are the most common uses of a find command builder. Running a custom command against every match via exec, and safely previewing what a cleanup script would delete before adding -delete, are common secondary uses.
What This Tool Doesn't Do
This tool builds the command text, it doesn't execute it, so no files on your machine or any server are actually searched, listed, or deleted, and no path or pattern is validated for safety beyond what's needed to assemble the flags, that matters most for the delete and exec actions, which are genuinely destructive or arbitrary-command-running once you run the copied output yourself. It also doesn't cover every flag GNU find supports, dozens of less common options exist beyond what's exposed here, and it targets GNU find syntax specifically, BSD find (the default on macOS) differs on several flags, most notably how -mtime and some other options are written.