[find] Search for files by their permission bits

Created on November 30, 2026

Use find -perm to match mode bits. This example searches for regular files with exactly 644 permissions.

mkdir -p sample
printf 'public\n' > sample/public.txt
printf 'private\n' > sample/private.txt
chmod 644 sample/public.txt
chmod 600 sample/private.txt
find sample -type f -perm 644
sample/public.txt

644 is octal. The owner can read and write, and the group and others can read. With a leading hyphen, as in -perm -600, the specified bits must all be set, and other bits may also be set.

The test checks mode bits. Effective access can also depend on ACLs and other rules.

Reference

Shell command find