I'm trying to clean up my samba share and need to print the found file or print the path of the image it tried to searched for. So far I have this but can't seem to get the logic right. Can anyone help point me in the right direction?
for FILE in `cat list`; do
if [ ! -z `find /opt -name $FILE` ];
then
echo "File $FILE does not exists"
else
echo "$FILE exists"
fi
done