[YLUG] symlinks

Charles Forsyth forsyth at terzarima.net
Fri May 23 09:12:30 BST 2008


> ln -s /home/www/website /var/www/website

when making symlinks, if you use a relative path in
the link, instead of an absolute path, the link will work correctly when
viewed through a remote mount (eg, using NFS, fuse or 9p).
typically that requires a sequence of ".." to head towards the root.

for instance, if i do
	ln -s ../../home/www/website /var/www/website
and mount the file system on another machine as /remote/filesystem, then
on that machine ls -lLd /remote/filesystem/var/www/website will find
/remote/filesystem/home/www/website.  if an absolute path is used,
the search will start at the mounting machine's /,
which probably isn't intended in this case (and many others like it).
the fiddly bit is getting the number of .. right (you
won't notice too many .. on the original system since /.. is /).




More information about the York mailing list