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

Stefan Walsen stefan at walsen.net
Thu Aug 19 01:53:55 CEST 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.

Stefan
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list