Reputation: 4099
Need help in understanding this complex Unix find command and its operation:
find . \( \! -user xx -exec chown -- xx '{}' + -false \) -o \
\( \! -group root -exec chgrp -- root '{}' + \) -o \
\( ! -perm 700 -exec chmod -- 700 '{}' + -exec false \; \)
Also, I am looking out in particular the purpose of -false predicate. I guess I mixed both GNU and non-GNU find syntax
Upvotes: 2
Views: 205
Reputation: 97948
The false predicate evaluated to false for -o
and it is used here to prevent short short-circuiting.
Each command is separated by -o
and terminated by false
so that they are ALL applied to each item.
Upvotes: 3