In AIX really, how can I search in several directories and those below it, for files that are not of the specific permissions of 755.

So I want to search /path/to/, /path/to/mydir, /path/to/mydir/andthisoneto, etc., but not /path.


If I understand correctly, you want this:

find /path -mindepth 2 -type f -not -perm 0755

Or maybe just this, if my understanding is off:

find /path/to -type f -not -perm 0755
  • Yes, I want something like the second. One I plugged your commands in but got these errors: find: 0652-017 -mindepth is not a valid option find: 0652-017 -not is not a valid option. – Off The Gold Mar 28 '12 at 18:53
  • Odd, what unix are you using? Also try: find -version – Alex Howansky Mar 28 '12 at 19:21
  • ok really it is AIX. find -version doesn't return a version. – Off The Gold Mar 28 '12 at 19:27
  • AIX uses ! to negate instead of -not, so: find /path/to -type f ! -perm 0755 – Alex Howansky Mar 28 '12 at 19:38
  • 1
    Yes, the find /path/to -type f ! -perm 0755 works. However is there a way to pipe this into ls -l so I can see the privs and owners - Thanks. – Off The Gold Mar 29 '12 at 12:49

So in the end I found the best way was this:

  ls -l `find /path/to -type f ! -perm 0755`

Thanks for all those who helped me.

  • # find /path/to -type f ! -perm 0755 -exec ls -l '{}' \; – vj- Mar 30 '12 at 1:08
  • vj, I tried you way but had no luck, but solution above works great. – Off The Gold Mar 30 '12 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.