find without permission denied

2016-11-29 ·
cli

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

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

Alternatively,

find . -name boo 2>&1 -print | grep -v 'permission denied'
Copyright © 2018 All rights reserved.
Powered by Kulfon.