-1

I'm working on implementing changes as required by CIS standards for section 9.1.12 (CentOS 6.) The following command returns a syntax error:

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

The error I get is:

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

Can someone please tell me what is wrong with this syntax? The point is to find and print un-grouped files and directories. Thanks in advance.

Mike D
  • 365
  • 6
  • 16

1 Answers1

2

The -group option expects an argument. For example, -group ichtys to find files owned by the group ichtys. You appear to be looking for the -nogroup option.

tripleee
  • 175,061
  • 34
  • 275
  • 318
  • Thanks for taking the time to answer. The point of this command, according to the CIS document is to locate files that are owned by users or groups not listed in the system configuration files. I'm looking for the correct syntax to do this. – Mike D Feb 03 '15 at 00:33
  • You seem to have lost the "no" in `-nogroup`. – tripleee Feb 03 '15 at 00:35