Looking for files NOT owned by someone

后端 未结 5 1258
灰色年华
灰色年华 2021-01-29 20:07

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.

5条回答
  •  粉色の甜心
    2021-01-29 20:40

    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
    

提交回复
热议问题