I\'m trying to check if a symlink exists in bash. Here\'s what I\'ve tried.
mda=/usr/mda if [ ! -L $mda ]; then echo \"=> File doesn\'t exist\" fi mda
Maybe this is what you are looking for. To check if a file exist and is not a link.
Try this command:
file="/usr/mda" [ -f $file ] && [ ! -L $file ] && echo "$file exists and is not a symlink"