Finding all the executables/binary in Linux rpm based distro.

I have been thinking about this for quite sometime now, how to find all the executables on the linux system. One of the way is to do a \”ls\” on all the directories in the PATH variable. But that will not list the executables that are outside of the PATH. So, I wrote this one liner :

rpm -qal |agrep \”bin\\/\” > all_execs

This will list all the files in the Linux system in bin or sbin directory and that should be pretty much all the binaries in the system.

This site uses Akismet to reduce spam. Learn how your comment data is processed.