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

2010-01-03 1 min read Linux

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.

comments powered by Disqus