find supress permission errors
A rather simple way would be to run

find / -type d -wholename "prog" -print 2&gt;&amp;1 | grep -v ": Permission denied"


(which would filter out any folders with "Permission denied" in the name as well, but that's probably not an issue).