Forked from demmm/gist:fc966e6becfea19ec27ac7421734ccd8
Created
May 11, 2018 15:22
-
-
Save ShalokShalom/93f8032db4b8df1620746f2824003cf9 to your computer and use it in GitHub Desktop.
check-links.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
files=$(find /usr/bin -maxdepth 1 -type f) | |
libs=$(find /usr/lib/*.so* -maxdepth 1 -type f) | |
clear | |
echo "Searching broken binaries...." | |
for binary in $files ; do | |
parse=$(ldd ${binary} | grep "not found") | |
if [ "${parse}" != "" ] ; then | |
echo "$(LC_ALL=C pacman -Qo $binary) seem broken!" | |
fi | |
unset parse | |
done | |
echo " " | |
echo "Searching broken libs...." | |
for lib in $libs ; do | |
if [ -x ${lib} ] ; then | |
parse=$(ldd ${lib} | grep "not found") | |
if [ "${parse}" != "" ] ; then | |
echo "$(LC_ALL=C pacman -Qo $lib) seem broken!" | |
fi | |
unset parse | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment