Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

migrated from stackoverflow.com Mar 30 '12 at 0:59

This question came from our site for professional and enthusiast programmers.

up vote 3 down vote accepted

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
share|improve this answer
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
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.

share|improve this answer
# 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 posting your answer, you agree to the privacy policy and terms of service.

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