On Wed, 7 Jul 1999, Jean-Louis Debert wrote:

> Hello all.
> Would somebody care to comment on the following:
> 
> [root@jld src]# ls -l
> total 12720 
> drwxr-xr-x   7 root     root         1024 Jun 27 14:04 RPM
> lrwxrwxrwx   1 root     root           11 Jul  4 11:59 linux ->
> linux-2.2.9
> drwxr-xr-x   2 root     root         1024 Jul  4 11:53 linux-2.2.10
> drwxr-xr-x  17 root     root         1024 Jul  4 11:46 linux-2.2.9
> -rw-r--r--   1 root     root     12969457 Jul  4 11:48
> linux-2.2.9-Mandrake-tar.gz
> [root@jld src]# ln -sf linux-2.2.10 linux
> [root@jld src]# ls -l
> total 12720
> drwxr-xr-x   7 root     root         1024 Jun 27 14:04 RPM
> lrwxrwxrwx   1 root     root           11 Jul  4 11:59 linux ->
> linux-2.2.9
> drwxr-xr-x   2 root     root         1024 Jul  4 11:53 linux-2.2.10
> drwxr-xr-x  17 root     root         1024 Jul  4 12:02 linux-2.2.9
> -rw-r--r--   1 root     root     12969457 Jul  4 11:48
> linux-2.2.9-Mandrake-tar.gz
> [root@jld src]# rm linux
> rm: d�truire `linux'? y
> [root@jld src]# ln -sf linux-2.2.10 linux
> [root@jld src]# ls -l
> total 12720
> drwxr-xr-x   7 root     root         1024 Jun 27 14:04 RPM
> lrwxrwxrwx   1 root     root           12 Jul  4 12:03 linux ->
> linux-2.2.10
> drwxr-xr-x   2 root     root         1024 Jul  4 11:53 linux-2.2.10
> drwxr-xr-x  17 root     root         1024 Jul  4 12:02 linux-2.2.9
> -rw-r--r--   1 root     root     12969457 Jul  4 11:48
> linux-2.2.9-Mandrake-tar.gz
> 
> 
> Please note that the first ln command seems to have been ignored (linux
> still 
> points linux-2.2.9, although 1) I had the -f modifier, and 2) I was root
> (since
> I was working in the kernel source tree) so I should have permissions.

It went into linux-2.2.9/ do it again and check there you will see a
linux/linux broken symlink, Because of the symlink being a directory
it thinks you want a symlink in the directory
 
> This is on a newly installed Mandrake 6.0 on a clean partition.
> I looked at the man page for ln and there it says that the -f modifier
> "will remove existing targets" whatever that means. It also says that
> this option is equivalent to --force  and here the name seems
> self-explanatory.
> This is precisely in _this_ sense that I wanted to use the option, i.e.
> make the link point to whatever I order it to, whether or not it was
> already pointing somewhere else ...
> 
> I _think_ that this is the first time that I catch this kind of
> behaviour,
> i.e. in previous linux distributions I'm pretty sure that it _did_
> behave
> as I would like it to. 

Nope is same

> So what has changed ??? the ln binary ??? I don't believe it, but even
> so,
> _why_ ? otherwise it has to be either the kernel ext2 code (which at the
> time
> was the one from Mandrake) or possibly the glibc 2.1 ???

This is the way it is supposed to work on directories, try it with a file
and it will work as you are expecting.

> 
> Would anybody care to comment ?
> 
> Thanks anyway.
>   
> -- 
> Jean-Louis Debert        [EMAIL PROTECTED]
> 74 Annemasse  France
> old Linux fan
> 

Reply via email to