Sample Header Ad - 728x90

How would I find uneven file permissions within a directory structure?

1 vote
1 answer
929 views
How could I go about finding uneven file/directory permissions within a directory structure? I've made some attempts at using the find command similar to: find /bin ! \( -perm 777 -o -perm 776 -o -perm 775 -o -perm 774 -o -perm 773 -o -perm 772 -o -perm 771 -o -perm 770 -o -perm 760 -o -perm 750 -o -perm 740 -o -perm 730 -o -perm 720 -o -perm 710 -o -perm 700 -o -perm 600 -o -perm 500 -o -perm 400 but I run out of command line before I can complete the remaining permutations plus an -exec ls -lL {} \; I've also been doing manual things similar to: ls -lL /bin | grep -v ^-rwxr-xr-x | grep -v ^-rwx--x--x | grep -v ^-rwsr-xr-x | grep -v ^-r-xr-xr-x | grep -v ^-rwxr-xr-t but again, I run out of command line before I can complete the remaining permutations. Both methods seem unusually awkward. Is there a better, faster, easier way? Note that I'm restricted in the shell I'm using (sh) and platform (Irix 6.5.22).
Asked by Rob (13 rep)
Oct 24, 2016, 11:08 PM
Last activity: Oct 25, 2016, 06:28 PM