Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I list all executables (programs) and shell scripts in a directory, sub-directory and/or PATH?

I am not talking about software that was installed with apt-get or any package manager. Using Ubuntu 12.04.

share|improve this question
up vote 7 down vote accepted

You can use ls, for example:

ls *.bin *.py

Add any other extensions you wish to list on the command line.

A better way would be to use find, for example:

  1. Do a recursive search from the current directory

    find . -type f -executable
  2. Search the current directory

    find . -type f -executable -maxdepth 1

Note: The dot after find means search from the current directory. Change it as needed to search from other directories.

share|improve this answer

If your'e the "creative" type, an ls command can show colorings for executable types as seen here. May not be as useful as filtering, but hey, it looks nice.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .