find without permission denied


2016-11-29 · 1 min read

Find a file named boo in the current directory without printing permission denied message once the file is not accessible

find . ! -readable -prune -name boo -print

Alternatively,

find . -name boo 2>&1 -print | grep -v 'permission denied'