[Gllug] Symbolic links and relative paths

Bruce Richardson itsbruce at uklinux.net
Mon Feb 2 18:46:54 UTC 2004

On Mon, Feb 02, 2004 at 05:07:10PM +0000, Tom wrote:
> Is it possible to use symbolic links in such a way that relative paths
> are relative to where the symlink is, not to where it points to?
> ie
> ln -s /tmp /home/tom/sandpit
> ls /home/tom/sandpit/../Mail
> won't work because there is no /tmp/../Mail. There is /home/tom/Mail,
> however, and that's what I want. Well, for the purposes of explanation
> anyway.

No.  In *nix, .. is not a code that the shell interpretes, as it is in
DOS/Windows.  Rather, it's a hard link to the actual parent directory.
This is true even if you are looking at a mounted Windows filesystem.


It is impolite to tell a man who is carrying you on his shoulders that
his head smells.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20040202/eb8b83c6/attachment.pgp>
-------------- next part --------------
Gllug mailing list  -  Gllug at gllug.org.uk

More information about the GLLUG mailing list