find Command Builder
Build a find command that matches files by name, type, age, size, owner and permissions, then lists, counts, deletes or runs a command on them.
Free · No sign-up · Your inputs stay in your browser
Input
Build a find command
Output
find command
Command
find /var/www/app/storage/logs -type f -name '*.log' -mtime +14 -print
-delete removes what matches, without asking. Run the same command with -print first and read the list. The order of tests matters only for speed and for -delete, which implies -depth. -exec ... + passes many paths per call; \; runs the command once per file.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
The everyday ones
Old logs: find /var/log/app -name '*.log' -mtime +14 -delete. Large files: find / -xdev -type f -size +500M. World-writable files: find /var/www -perm -o+w. The tests and actions are described in GNU findutils' manual.
Run it with -print first
-delete acts on everything that matches, immediately, and it implies -depth. A pattern without quotes is expanded by the shell before find sees it, so find . -name *.log can quietly search for the name of one file in the current directory. Run the command with -print, read the list, then swap the action.