How to find all executable files? (AIX)

aixshellunix

example

-rwxr--r--    1 me     users             0 May 27 13:58 file_0
-rw-rwxrw-    1 me     users             0 May 27 13:58 file_1
-rw-rw-rwx    1 me     users             0 May 27 13:59 file_2
-rwxrwxrwx    1 me     users             0 May 27 14:02 file_3

I would need to list all 4 files in the current dir

  • AIX
  • non-gnu 'find', so "find . -executable" won't work

Best Answer

find . -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \)

worked for me. any other solutions?