Arnaud Charlet <char...@adacore.com> writes: > That's wrong. The above is
> $(LN_S) /full/path/to/a_file a_dir > which is quite different from > $(LN_S) a_file a_dir > and will work equally well with ln or ln -s or cp -p. This is not historically portable for ln -s. Passing in a directory as the second argument to ln and expecting that to be equivalent to ln -s /path/to/file /path/to/directory/file (in other words, to use the basename of the first argument) was originally behavior one could only rely on with GNU utilities. I remember modifying software to remove that assumption when porting to various versions of UNIX. Since then, the behavior you're relying on has been adopted by POSIX, and I think all or nearly all of the UNIX vendors have implemented it in their own versions of ln, so these days you may no longer care. But there definitely were UNIX systems where this didn't work and would result in an error saying that a_dir already exists. -- Russ Allbery (r...@stanford.edu) <http://www.eyrie.org/~eagle/>