LangStop

find

Search for files in a directory hierarchy

Safety Advisory

Destructive actions (like `-delete` or running side-effect `-exec` scripts) run instantly. Always test query outputs first without destructive flags.

Command
find .
Required Arguments
Flags & Options

No flags added. Pick from the options below.

Global Options

-maxdepth
Max depth
-mindepth
Min depth
-depth
Depth-first traversal

Process each directory's contents before the directory itself. Also implied by -delete.

-d
Depth-first (BSD alias)

Synonym for -depth, for compatibility with FreeBSD, NetBSD, macOS, and OpenBSD.

-mount
Don't cross mounts

Ignore files on other filesystems/devices.

-xdev
Same device only

Don't descend into directories on other devices.

-noleaf
No leaf optimisation

Disable the hard-link-count optimisation. Required for CD-ROM, MS-DOS, and AFS filesystems.

-ignore_readdir_race
Ignore readdir race

Suppress errors when a file disappears between readdir(3) and stat(2).

-noignore_readdir_race
Restore readdir race errors

Turn off -ignore_readdir_race.

-files0-from
Read paths from file

Read NUL-separated starting points from a file instead of the command line. Use '-' for stdin.

Tests

-H
Symlinks: CLI only

Follow symlinks only for command-line arguments; otherwise use link properties. Must appear before the search path.

-L
Symlinks: follow all

Always follow symbolic links. Implies -noleaf. Must appear before the search path.

-P
Symlinks: never follow

Never follow symbolic links (default). Must appear before the search path.

-daystart
Times from day start

Measure times from the beginning of today rather than 24 h ago. Affects -amin, -atime, -cmin, -ctime, -mmin, -mtime.

-regextype
Regex type

Sets the regex dialect for -regex and -iregex tests that follow on the command line.

-follow
Follow symlinks (deprecated)

Deprecated — use -L instead. Dereferences symbolic links from the point it appears onward. Implies -noleaf.

-warn
Warnings on

Enable command-line usage warnings (default when stdin is a tty).

-nowarn
Warnings off

Suppress command-line usage warnings.

-name
Name (case-sensitive)

Base filename matches the shell pattern. Wrap in quotes to prevent shell globbing.

-iname
Name (ignore case)

Like -name but case-insensitive.

-path
Path pattern

Full file path matches a shell pattern. '/' and '.' are not treated specially.

-ipath
Path pattern (ignore case)

Like -path but case-insensitive.

-wholename
Whole name

Alias for -path. Less portable.

-iwholename
Whole name (ignore case)

Alias for -ipath. Less portable.

-regex
Regex (full path)

Full path matches a regular expression. Uses Emacs-style regex by default; change with -regextype.

-iregex
Regex (ignore case)

Like -regex but case-insensitive.

-type
File type

Multiple types can be combined as a comma-separated list (GNU extension), e.g. f,l.

-xtype
File type (symlink-aware)

Like -type but checks through symlinks (or the link itself when -L is active).

-size
Size

Units: b=512-byte blocks (default), c=bytes, w=2-byte words, k=KiB, M=MiB, G=GiB. Prefix + = greater than, - = less than.

-empty
Empty only

True if the file is empty and is either a regular file or a directory.

-mtime
Modified (days)

Data modified less than (-n), more than (+n), or exactly (n) n×24 hours ago.

-mmin
Modified (minutes)

Data last modified less than, more than, or exactly n minutes ago.

-atime
Accessed (days)

Last accessed less than, more than, or exactly n×24 hours ago.

-amin
Accessed (minutes)

Last accessed less than, more than, or exactly n minutes ago.

-ctime
Status changed (days)

Inode status last changed less than, more than, or exactly n×24 hours ago.

-cmin
Status changed (minutes)

Inode status last changed less than, more than, or exactly n minutes ago.

-newer
Newer than file

True if this file's modification time is more recent than the reference file's.

-anewer
Accessed newer than

True if this file's access time is more recent than the reference file's modification time.

-cnewer
Status newer than

True if this file's inode-change time is more recent than the reference file's modification time.

-newerXY
Newer (timestamp pair)

Compare timestamp X of current file against timestamp Y of reference. Replace XY with letter pairs: a=access, B=birth, c=inode-change, m=modification, t=interpret reference as a time string. E.g. '-newermt 2024-01-01'.

-used
Accessed after status change (days)

File was last accessed less than, more than, or exactly n days after its inode status was last changed.

-user
Owner (user)

File is owned by the named user (name or numeric UID).

-uid
Owner UID

File's numeric user ID is less than (+n), more than (-n), or exactly n.

-nouser
No matching user

True if no user in /etc/passwd corresponds to the file's numeric UID.

-group
Owner (group)

File belongs to the named group (name or numeric GID).

-gid
Owner GID

File's numeric group ID is less than, more than, or exactly n.

-nogroup
No matching group

True if no group in /etc/group corresponds to the file's numeric GID.

-perm
Permissions

Mode can be exact octal (644), exact symbolic (g=w), minimum-bits (-664 or -g+w), or any-bits (/222 or /u+w).

-readable
Readable by current user

Matches files readable by the current user (honours ACLs; uses access(2)).

-writable
Writable by current user

Matches files writable by the current user (honours ACLs; uses access(2)).

-executable
Executable by current user

Matches executable files or searchable directories for the current user (honours ACLs; uses access(2)).

-links
Hard link count

File has fewer, more, or exactly n hard links.

-inum
Inode number

File has this inode number. Prefer -samefile when possible.

-samefile
Same inode as

True if the file refers to the same inode as the named file.

-lname
Symlink target pattern

True if the file is a symlink whose contents match the shell pattern.

-ilname
Symlink target (ignore case)

Like -lname but case-insensitive.

-fstype
Filesystem type

File is on a filesystem of this type. Use -printf %F to discover type names.

-true
Always true

Always evaluates to true. Useful for side-effect-only expressions.

-false
Always false

Always evaluates to false.

-context
SELinux context

(SELinux only) Security context of the file matches the glob pattern.

Actions

-print
Print (newline-sep)

Print the full file name followed by a newline. This is the default action.

-print0
Print (null-sep)

Print the full file name followed by a NUL character. Safe for filenames with spaces or newlines. Pair with xargs -0.

-printf
Print formatted

Print a format string to stdout. Supports %-directives (%p=path, %f=basename, %s=size, %m=mode octal, %M=mode symbolic, %u=user, %g=group, %t=mtime, %y=type…) and \-escapes. No trailing newline added.

-ls
List (ls -dils format)

List matched files in ls -dils format on stdout (1 KiB blocks unless POSIXLY_CORRECT is set).

-fprint
Print to file

Like -print but write to the named file (created or truncated). File is always created even if no match.

-fprint0
Print to file (null-sep)

Like -print0 but write to the named file.

-fprintf
Print formatted to file

Like -printf but write to a file. First argument is the file path, second is the format string.

-fls
List to file

Like -ls but write to the named file.

-exec
Execute command

Run on every result. {} is the file placeholder. Terminate with \; (once per file) or {} + (batch, like xargs). Runs from the starting directory.

-execdir
Execute in file's dir

Like -exec but the command runs from the file's own directory. Much more secure; avoids path-resolution races.

-ok
Execute (interactive)

Like -exec but prompts the user before each invocation. Responds to yes/no.

-okdir
Execute in dir (interactive)

Like -execdir but prompts the user before each invocation.

-delete
Delete matches

Deletes matched files or empty directories. Implies -depth. Cannot usefully combine with -prune. Use with extreme care.

-prune
Prune directory

If the matched file is a directory, don't descend into it. Has no effect when -depth is in use.

-quit
Quit after first match

Exit immediately with status 0 after the first match (pending -exec … {} + lines are still flushed first).

Tip: Wrap patterns in quotes: "*.sh" prevents shell globbing.

;

Linux Find Command Builder – Visual find CLI Generator

The Linux find command builder is a powerful developer tool that helps you generate complex find commands visually without memorizing syntax.

Whether you're searching files, filtering by size, or executing commands on results, this tool simplifies everything.


🚀 What is the Linux find Command?

The find command is used to search for files and directories in a directory hierarchy.

Key capabilities:

  • 🔍 Search by name, type, size, or permissions
  • 📅 Filter files by modification time
  • ⚙️ Execute commands on matched files
  • 🔗 Combine multiple conditions

⚡ Why Use a Find Command Builder?

Writing find commands manually can be:

  • ❌ Complex and hard to remember
  • ❌ Error-prone with multiple flags
  • ❌ Difficult to debug

✅ This tool helps you:

  • Build commands step-by-step
  • Avoid syntax mistakes
  • Learn while using
  • Instantly copy working commands

🧾 Basic Syntax of find

find [path] [expression]

Explanation:

  • [path] → directory to search (e.g., ., /home)
  • [expression] → filters and actions

🔧 Common Find Command Examples

1. Find files by name

find . -name "file.txt"
  • Searches for a file named file.txt in the current directory

2. Case-insensitive search

find . -iname "file.txt"

3. Find directories only

find . -type d

4. Find files larger than 100MB

find . -size +100M

5. Find and delete files

find . -name "*.log" -delete

⚠️ Use with caution — this permanently deletes files.


6. Execute a command on results

find . -name "*.js" -exec wc -l {} \;
  • Counts lines in all JavaScript files

🧠 Advanced Use Cases

  • 🔎 Clean up old log files automatically
  • 📦 Find large files consuming disk space
  • 🔐 Audit file permissions
  • ⚡ Batch process files with scripts

🖥 Features of This Find Command Builder Tool

  • 🧩 Visual rule builder (name, size, type, date)
  • ⚡ Real-time command preview
  • 📋 Copy to clipboard
  • 🧠 Inline explanations for each option
  • 🌐 Runs entirely in your browser (no server)

🎯 Who Should Use This Tool?

  • Developers working with Linux systems
  • DevOps engineers
  • System administrators
  • Beginners learning shell commands

❓ Frequently Asked Questions

What does the find command do?

  • It searches files and directories based on conditions

Is this find command builder free?

  • Yes, it runs completely in your browser

Can I use this tool offline?

  • Yes, once loaded, it works without a backend

Is it safe to use?

  • Yes, no data leaves your browser

🔗 Related Linux Tools

  • JSON Formatter
  • Base64 Encoder / Decoder
  • cURL Command Builder
  • Regex Tester

🏁 Conclusion

The Linux Find Command Builder helps you save time, avoid errors, and learn faster by simplifying one of the most powerful Linux commands.

Start building your find commands visually and boost your productivity 🚀