[buug] ln -sf bug
Michael Paoli
mp at rawbw.com
Thu Aug 5 23:33:33 PDT 2004
And the answer is ...
Well, first of all, when all else fails, RTFM :-)
It looks like at some point in time ln(1) was "enhanced".
E.g. from Debian 3.0r2:
-n, --no-dereference
treat destination that is a symlink to a directory
as if it were a normal file
So seems at least for some versions of ln, the default behavior now for
ln is to dereference the target.
Quoting Michael Paoli <mp at rawbw.com>:
> Yes, definitely rather puzzling - at least at first glance.
>
> I confirmed I get similar behavior (did quick check with Linux 2.4.26
> kernel on reiserfs filesystem). Not certain it's a "bug" at this point,
> but my first inclination would be to say it at least violates the
> "principle of least surprise".
> I also checked and noted the ln command also returns exit value 0.
>
> I'm inclined to do an strace and see what's happening at a lower level
> (call, arguments, and return value).
>
> Quoting Ian Zimmerman <itz at buug.org>:
>
> > Same here. Local drive, definitely clean, exit status of ln is 0.
> > itz at unicorn:~$ uname -a
> > Linux unicorn 2.4.26-2custom7 #1 Wed Jul 21 00:35:24 PDT 2004 i686
> > GNU/Linux
More information about the buug
mailing list