Skip to main content
added 87 characters in body
Source Link
Stéphane Chazelas
  • 587.9k
  • 96
  • 1.1k
  • 1.7k

On Solaris (which BTW is no longer BSD-based), you should be able to use GNU find where -perm accepts a /bitset which evaluates to true if any of the file permission bits are in bitset.

/usr/gnu/bin/find . ! -perm /07777 -ls 

Or

/usr/gnu/bin/find . ! -perm /go=rwx -ls 

Would return the files where none of the ---rwxrwx bits are set.

Or you could use zsh which should be installed by default on Solaris as long as you're not using a stripped down flavour:

ls -ld -- **/*(Df00) 

Or:

ls -ld -- **/*(Df-77) 

Or:

ls -ld -- **/*(Df[go=]) 

Or:

ls -ld -- **/*(D^AIERWX) 

From another shell:

zsh -c 'ls -ld -- **/*(Df[go=])' 

For instance.

On Solaris (which BTW is no longer BSD-based), you should be able to use GNU find where -perm accepts a /bitset which evaluates to true if any of the file permission bits are in bitset.

/usr/gnu/bin/find . ! -perm /077 -ls 

Or

/usr/gnu/bin/find . ! -perm /go=rwx -ls 

Would return the files where none of the ---rwxrwx bits are set.

Or you could use zsh which should be installed by default on Solaris as long as you're not using a stripped down flavour:

ls -ld -- **/*(Df00) 

Or:

ls -ld -- **/*(Df-77) 

On Solaris (which BTW is no longer BSD-based), you should be able to use GNU find where -perm accepts a /bitset which evaluates to true if any of the file permission bits are in bitset.

/usr/gnu/bin/find . ! -perm /77 -ls 

Or

/usr/gnu/bin/find . ! -perm /go=rwx -ls 

Would return the files where none of the ---rwxrwx bits are set.

Or you could use zsh which should be installed by default on Solaris as long as you're not using a stripped down flavour:

ls -ld -- **/*(Df00) 

Or:

ls -ld -- **/*(Df-77) 

Or:

ls -ld -- **/*(Df[go=]) 

Or:

ls -ld -- **/*(D^AIERWX) 

From another shell:

zsh -c 'ls -ld -- **/*(Df[go=])' 

For instance.

Source Link
Stéphane Chazelas
  • 587.9k
  • 96
  • 1.1k
  • 1.7k

On Solaris (which BTW is no longer BSD-based), you should be able to use GNU find where -perm accepts a /bitset which evaluates to true if any of the file permission bits are in bitset.

/usr/gnu/bin/find . ! -perm /077 -ls 

Or

/usr/gnu/bin/find . ! -perm /go=rwx -ls 

Would return the files where none of the ---rwxrwx bits are set.

Or you could use zsh which should be installed by default on Solaris as long as you're not using a stripped down flavour:

ls -ld -- **/*(Df00) 

Or:

ls -ld -- **/*(Df-77)