mike628 mike628 - 1 year ago 148
Linux Question

Looking for files NOT owned by someone

I'm looking to recursively look through directories to find files NOT owned by a particular user and I am not sure how to write this.

Mel Mel
Answer Source

The find(1) utility has primaries that can be negated ("reversed") using the "!" operator. On the prompt one must however escape the negation with a backslash as it is a shell metacharacter. Result:

find . \! -user foo -print
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download