Ubuntu – How to find executables

find

I know there is a find switch. but I want to know how to search a specific type of file. For example I need kind of terminal command which search for only executable files.

Best Answer

This should do what you want:

find . -perm -u+x -type f  

If you want to find everything that could possibly be executable, you could look at mime-types or file output. That would be counter-productive though since you couldn't possibly catch every script.

References:
The man page
Stackoverflow