寻找非特定用户拥有的文件 [英] Looking for files NOT owned by a specific user

查看:43
本文介绍了寻找非特定用户拥有的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望递归浏览目录以查找不属于特定用户的文件,并且不确定如何编写.

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.

推荐答案

find(1)实用程序具有可以使用!"取反(取反")的主键.操作员.但是,在提示符下必须使用反斜杠转义,因为它是一个外壳元字符.结果:

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

这篇关于寻找非特定用户拥有的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆