find do not print permission denied code example
Example 1: how to silence operation not permitted
Just add "2>/dev/null" at the end of your command pipe as for example:
find . -name log 2>/dev/null
Example 2: hide permission denied ~/.bash
find /path/to/dir -name "search-patter" 2>&1 | grep -v "Permission denied" > output-file
find /etc -name "x*.conf" 2>&1 | grep -v "Permission denied" > output.txt