Find files by permissions using find -perm

The -perm primary of find matches files by their octal permission bits, letting you audit for world-writable files or confirm that binaries carry the mode you expect.

macOSchmodpermissionsfindLow risk
Run `find . -type f -perm -002` to list files that are writable by others, or `find . -type f -perm 755` for an exact mode match.

01Command

Command
$ find /usr/local/bin -type f -perm -002
find . -type f -perm 755

02What it does

A mode prefixed with a dash (e.g. -perm -002) matches files that have all of those bits set, while a bare number like 755 requires an exact match. This is a fast way to audit scripts shared on disk for overly permissive modes before tightening them with chmod.

03Risk

RiskLow risk
!Warning: An exact `-perm 755` will not match files with mode 775; remember the dash-prefix form when auditing for 'at least these bits'.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-17 · Category: Files & Folders

06Related solutions