Hello! I'm trying to use find(1) in a POSIX way to list all the files (not directories) with at least one execute bit set. In other words, all the following modes should cause a match:
-rwxr-xr-x 1 myuser wheel 6 Aug 14 11:46 file1 -rwxr--r-- 1 myuser wheel 7 Aug 14 11:46 file2 -rw-r-xr-- 1 myuser wheel 4 Aug 14 11:52 file3 -rw-r--r-x 1 myuser wheel 6 Aug 14 11:53 file4 -rwxr-xr-- 1 myuser wheel 6 Aug 14 12:10 file5 (also `rwxr--r-x' should match, and so on). The only way I found so far is the following: find /target_directory/ -type f -perm -001 -or -type f -perm -010 -or -type f -perm -100 It seems to work, but it's somewhat cumbersome. In GNU find, there is a single dedicated option, `-executable'. Is there a more compact, but still POSIX, way to obtain the same result with NetBSD's find(1)? Bye! Rocky