[find] Find empty regular files

Created on November 30, 2026

Use find -empty to locate empty paths. Create the sample files below.

mkdir -p sample
: > sample/empty.txt
printf 'hello\n' > sample/not-empty.txt

Add -type f to select only regular files.

find sample -type f -empty
sample/empty.txt
Shell command