[Chapter 18] 18.8 Showing the Actual Filenames for Symbolic Links
Author: Jerry Peek, Tim O'Reilly & Mike Loukides
Date: 1998-08-04T21:39:04Z

#

| Chapter 18 Linking, Renaming, and Copying Files |

## 18.8 Showing the Actual Filenames for Symbolic Links

sl | The sl program is a perl (37.1) script that traverses the pathnames supplied on the command line, and for each one, tells you if it had to follow any symbolic links to find the actual filename. Symbolic links to absolute pathnames start over at the left margin. Symbolic links to relative pathnames are aligned vertically with the path element they replace. For example:

>     $ sl /usr/lib/libXw.a

>     /usr/lib/libXw.a:
>     /usr/lib/libXw.a -> /usr/lib/X11/libXw.a
>     /usr/lib/X11 -> /X11/lib
>     /X11 -> /usr/local/X11R4
>     /usr/local/X11R4/lib/libXw.a

>     $ sl /bin/rnews

>     /bin -> /usr/bin
>     /usr/bin/rnews -> /usr/lib/news/rnews
>     /usr/lib/news -> ../local/lib/news
>          local/lib/news/rnews -> inews
>                         inews

- LW, RS

18.7 Linking Directories |  | 18.9 Renaming, Copying, or Comparing a Set of Files