[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Attempting to create a symbolic link from a file in current director
From: |
Mike Frysinger |
Subject: |
Re: Attempting to create a symbolic link from a file in current directory to a target directory creates broken symlink |
Date: |
Mon, 21 Jan 2008 17:19:30 -0500 |
User-agent: |
KMail/1.9.7 |
On Monday 21 January 2008, Robert Miesen wrote:
> tree mkdir -p LnBugDir/Dir LnBugDir/path/to/DestDir/
> cd LnBugDir
> ln -s Dir ./path/to/DestDir/Dir
as you noted, the behavior you're seeing is correct. as for whether the
documentation you're quoting could be made clearer ...
> I checked the FAQ for ln and it would appear that what I'm calling a
> "bug" GNU calls a "feature." However, I looked into the manuals (both
> man and the more favored info pages) and the manual does not make clear
> that the argument provided to TARGET needs to be reachable from
> LINKNAME. For example, this is what is in the info page regarding how I
> am invoking the ln command:
>
> * If two file names are given, `ln' creates a link to the first file
> from the second.
>
> So in the manual, it is not immediately clear to someone just
> referencing the manual that if TARGET does not exist from DIRECTORY, the
> link will remain broken until the TARGET exists in DIRECTORY. That even
> seems quite counterintuitive, since it seems more like the argument I
> passed in to ln would be relative to the cwd (Current Working
> Directory), not DIRECTORY (the cwd file I'm talking about can be found
> in /proc/runningProcess/).
the ln utility does not do anything magic. the link semantics are handled by
the underlying operating system, not ln. if you look at the SEE ALSO
section, you'll see link(2) and symlink(2) which explain the behavior of hard
and symbolic links.
-mike
signature.asc
Description: This is a digitally signed message part.