Symlinks (was Re: [OS X TeX] Fwd: Unwanted files have which extensions?)

Stefan Walsen stefan at
Wed Aug 18 19:53:55 EDT 2004

Bruno Voisin wrote:
> I've never got the syntax of ln to work exactly as I wanted it to, for  
> example specifying the name of the symlink to be different from the  
> link of the original file (or directory). [...]
> Maybe some Unix-knowledgeable people on this list would have more  
> helpful indications on the precise syntax of ln?

It's quite simple, really:

You just supply the name you want the symlink to have as a second 
argument to ln.

   ln -s <original> <link>

will give you a symlink called <link> pointing to the <original>.
<original> can be an absolute (beginning with "/") or relative pathname, 
and <original>, the "link target", does not need to exist.
If an existing directory is given as <link>, a symlink with the name of 
the original will be created in the given directory. If an existing file 
is given, you get an error.

You can have great fun with symlinks pointing to directories further up 
in the file system tree, creating endless loops.

You can also create hardlinks to files (by not specifying the "-s"), but 
that's a story for another day.

--------------------- Info ---------------------
Mac-TeX Website:
           & FAQ:
List Post: <mailto:MacOSX-TeX at>

More information about the MacOSX-TeX mailing list