-P options control the treatment of symbolic links.
Command-line arguments following these are taken to be names of files
or directories to be examined, up to the first argument that begins
-, or the argument
!. That argument and any
following arguments are taken to be the expression describing what is
to be searched for. If no paths are given, the current directory is
used. If no expression is given, the expression
-print is used (but
you should probably consider using
-print0 instead, anyway).
The starting point,
/ in your case, isn't processed in the same way as expressions. The latter,
-o -group `id -g` -perm \
-g=w -perm -u=s -o -perm -o=w\
-perm -u=s -o -perm -o=w \
-perm -g=s -ls
in your case, are applied to all the files found from the starting point.
-o is a binary operator which requires expressions on both sides, so this command actually fails:
find: invalid expression; you have used a binary operator '-o' with nothing before it.
If you remove the first
-o, it becomes equivalent to
( -group `id -g` -perm -g=w -perm -u=s )
-o ( -perm -o=w -perm -u=s )
-o ( -perm -o=w -perm -g=s -ls )
which only lists files which are setgid and writable by others. The first two groups of expressions have no action so they are applied but don't have any visible effect.