Bash CIS 文档中的语法错误

Bash syntax error in CIS document

我正在按照 CIS 标准第 9.1.12 节 (CentOS 6) 的要求实施更改。以下命令 returns 语法错误:

df --local -P | awk {'if (NR!=1) print '} | xargs -I '{}' find '{}' -xdev -group -ls

我得到的错误是:

find: `-ls' is not the name of an existing group
find: `-ls' is not the name of an existing group
find: `-ls' is not the name of an existing group

谁能告诉我这个语法有什么问题吗?重点是查找并打印未分组的文件和目录。提前致谢。

-group 选项需要一个参数。例如,-group ichtys 查找组 ichtys 拥有的文件。您似乎在寻找 -nogroup 选项。