mardi 24 mars 2015

How to verify the target of a symbolic link points toward a particular path


Within a bash script, I know I can check if a file is a symbolic link with the following syntax



if [ -L $path ]


Does any one know how I would test if that path was linked to a particular path? E.g. I want to check whether the target of $path is /some/where.



Aucun commentaire:

Enregistrer un commentaire