The small http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/print-symlink.c program in Fig. 7 prints the target of the symbolic link specified on its command line.
Figure 7:
Print the Target of a Symbolic Link.
|
$ ln -s /usr/bin/wc my_link
$ ./print-symlink my_link