Skip to main content
added 73 characters in body; edited tags
Source Link
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k

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

if [ -L $path ]

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.

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?

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.

edited title
Link
BillMan
  • 363
  • 1
  • 3
  • 6

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

Source Link
BillMan
  • 363
  • 1
  • 3
  • 6

How to verify that 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?