mike628 mike628 - 4 months ago 10x
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

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