[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: symlink weirdness
From: |
Barry Margolin |
Subject: |
Re: symlink weirdness |
Date: |
Mon, 13 Sep 2004 21:57:45 -0400 |
User-agent: |
MT-NewsWatcher/3.4 (PPC Mac OS X) |
In article <db3559c4.0409131611.28861482@posting.google.com>,
rdnews@dahlsys.com (Roger Dahl) wrote:
> If your current directory is A and you want to create a relative
> symlink to a file in directory B in directory C, you need to type the
> path as it would look from C, not from A.
>
> Though I understand that this makes 'ln' very simple (it just copies
> the argument into the link file), it doesn't make sense from a users
> perspective. When I'm in A, I can 'cp' from B to C without figuring
> out what the path to C will look like from B. 'cp -s' is even worse --
> it can only make links in the current directory.
Actually, the reason for this is that relative symlinks are interpreted
relative to the directory they appear in. This allows you to mount the
filesystem anywhere in the hierarchy, and relative symlinks will work
properly. Also, you can archive a directory containing relative
symlinks using something like tar, and the symlinks will be correct when
you restore it.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
- symlink weirdness, Roger Dahl, 2004/09/13
- Re: symlink weirdness,
Barry Margolin <=
- Re: symlink weirdness, Sam Holden, 2004/09/13
- Re: symlink weirdness, Roger Dahl, 2004/09/14
- Re: symlink weirdness, Stefan Monnier, 2004/09/14
- Re: symlink weirdness, Roger Dahl, 2004/09/15
- Re: symlink weirdness, Stefan Monnier, 2004/09/15
- Re: symlink weirdness, Roger Dahl, 2004/09/16
- Re: symlink weirdness, Barry Margolin, 2004/09/18
Re: symlink weirdness, Barry Margolin, 2004/09/13