This command: find $HOME/Dev/missing \( -not -path '/home/filip/Dev/missing/.password-store' \)
returns this:
/home/filip/Dev/missing
find: ‘/home/filip/Dev/missing/.password-store’: Permission denied
/home/filip/Dev/missing/data-wrangling
But I excluded the path that can't be read.
Is there a way to disable this behavior?
While you are excluding the exact path .password-store
itself, find is still looking to descend into it (assuming it is a directory). The -prune
option stops snips off the search tree at this point and stops any further exploration within this path.
Try something like:
find $HOME/Dev/missing -path $HOME/Dev/missing/.password-store -prune -o -print