Linux Commands - find command - executable files

by
Jeremy Canfield |
Updated: July 22 2021
| Linux Commands articles
The find command with the -executable flag can be used to return all of the executable files below a certain directory. In this example, every executable file below the /usr/local directory will be returned.
find /usr/local -type f -executable
Something like this should be returned.
/usr/local/foo.sh
/usr/local/bin/bar.pl
The ! character can be used to return non-executable files.
find /usr/local -type f ! -executable
Did you find this article helpful?
If so, consider buying me a coffee over at