With ldd
you can get the libraries that tools use. To rank the usage of libraries for a set of tool you can use something like the following command.
ldd /bin/* /usr/bin/* ... | sed -e '/^[^\t]/ d; s/^\t\(.* => \)\?\([^ ]*\) (.*/\2/g' | sort | uniq -c
(Here sed
strips all lines that do not start with a tab and the filters out only the actual libraries. With sort | uniq -c
you get each library with a count indicating the number of times it occurred.)
You might want to add sort -g
at the end to get the libraries in order of usage.
Note that you probably get lines two non-library lines with the above command. One of static executables ("not a dynamic executable") and one without any library. The latter is the result of linux-gate.so.1
which is not a library in your file system but one "supplied" by the kernel.