Everywhere All articles Download

Command line and power tools

Using find on a Mac

Updated 2026-07-31 · 6 min read

find reads the filesystem directly, so it sees everything an index might miss. macOS ships the BSD version, which differs from Linux in ways that matter.

The shape of a command

find <where> <what> <action>
find ~/Documents -name "*.pdf" -print

-print is the default and can be omitted.

Matching names

find ~ -name "report*"        # case-sensitive
find ~ -iname "report*"       # case-insensitive — usually what you want
find ~ -name "*.pdf" -o -name "*.PDF"

Restricting by type

find ~ -type f          # files
find ~ -type d          # directories
find ~ -type l          # symlinks

Depth

find ~ -maxdepth 2 -name "*.txt"
find ~ -mindepth 3 -type d

Size and time

find ~ -size +100M
find ~ -mtime -7
find ~ -newermt "2026-01-01"

Skipping noise

-prune stops descent, which is the difference between a fast search and a slow one:

find ~ -type d -name node_modules -prune -o -type f -name "*.js" -print

Read that as: when you meet a node_modules directory, do not go in; otherwise print matching .js files.

Acting on results

find ~ -name "*.tmp" -delete
find ~ -name "*.log" -exec ls -lh {} \;
find ~ -name "*.png" -exec cp {} ~/Desktop/collected/ \;

-exec ... {} + batches arguments and is much faster than \; for large result sets.

The BSD differences that bite

Most find examples online are written for GNU find. If one fails on macOS, this is usually why.

Errors

find / -name "something" 2>/dev/null

2>/dev/null hides the permission-denied noise from folders you cannot read.

Common questions

Why does find say 'Operation not permitted' on macOS?

System Integrity Protection and privacy protections block some paths. Granting Terminal Full Disk Access in System Settings resolves most of it.

Is find slower than Spotlight?

Yes, because it reads the directory tree each time rather than consulting an index. It is also complete, which an index may not be.

Find any file before you finish typing

Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.

Download for Mac

Related

© 2026 Caretopia Network Private Limited Everywhere for Mac Articles Privacy Support