Summary: | ln dereferences target symlink rather than replacing when using -f | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Stanislav Nikolov <stanley_87> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Stanislav Nikolov
2005-08-10 07:51:19 UTC
your foo symlink is being created inside of linux/ looks like ln dereferences the target before creating the symlink, but the -f option is working fine (as your example shows) From the manpage: -n, --no-dereference When given an explicit destination that is a symlink to a directory, treat that des- tination as if it were a normal file. When the destination is an actual directory (not a symlink to one), there is no ambiguity. The link is created in that directory. But when the specified destina- tion is a symlink to a directory, there are two ways to treat the user's request. ln can treat the destination just as it would a normal directory and create the link in it. On the other hand, the destination can be viewed as a non-directory -- as the symlink itself. In that case, ln must delete or backup that symlink before cre- ating the new link. The default is to treat a destination that is a symlink to a directory just like a directory. So this looks like the correct behaviour to me. indeed, thanks for that |