#!/usr/bin/env bash # some apps install executables into subdirs of /lib, so we check the whole tree IFS=$'\n' prevpkg= for f in $( find /bin /lib* /sbin -type f ); do if lddtree "${f}" | grep -q /usr; then echo "${f}" fi done | for f in $( qfile -C -e -f - | sort ); do pkg=${f%% *} fn=${f#${pkg} (} fn=${fn%)} if [[ ${pkg} != ${prevpkg} ]]; then echo ${pkg} echo --------------------------------------- echo prevpkg=${pkg} fi lddtree "${fn}" echo done