I'm trying to use Unix's find command to count the number of executable files in a directory of a certain type, namely Solaris(MSB) executable's. I know I can get the count of all executable files in this directory fairly easy with
find . -type f -perm -u+rx | wc -l
however this doesn't count Solaris(MSB) executable files exclusively. I thought to remedy this I would just throw in a
-name flag, something like this.
find . -name "sparc*" -type f -perm -u+rx | wc -l
This will correctly return that there are 6 only if I remove the part of the command that specify's that they need to be executable, if I keep this part of the command it returns a count of 0 which is "wrong". When I look at the
ls -l command below I can see that these files are executable I think? or that they are pointing to an executable? This might be the root of the problem.
ls -l lrwxrwxrwx 1 root other 57 Jul 15 2005 sparc-sun-solaris2.9-c++ -> /usr/local/gnu/pkg/gcc-3.3.6/bin/sparc-sun-solaris2.9-c++*
Any insight is appreciated.