how to silence operation not permitted

C++
Just add "2>/dev/null" at the end of your command pipe as for example:
find . -name log 2>/dev/null
Source

Also in C++: