On Tuesday 14 February 2006 15:14, Neil Bothwick <[EMAIL PROTECTED]> wrote about 'Re: [gentoo-user] Dumb symlink question': > On Fri, 10 Feb 2006 01:43:21 -0600, Boyd Stephen Smith Jr. wrote: > > > ln doesn't overwrite symlinks to directories, although this is not > > > mentioned in the man page. Either delete the link first, or emerge > > > your new kernel source with the symlink USE flag. > > > > That's just not true. Heck, I thought you were the one that told me > > about the -n flag (see my other post), Neil. > > Not me, -n is a new one to me. However, my statement was partly true, > the man page doesn't mention that -f doesn't overwrite links to > directories.
That's because this case falls under the case "the the target is a directory, make the symlink in (not as) the directory". In fact check this out: $ find | xargs ls -ld drwxr-xr-x 4 bss03 users 100 Feb 14 15:31 . drwxr-xr-x 2 bss03 users 40 Feb 14 15:30 ./bar lrwxrwxrwx 1 bss03 users 3 Feb 14 15:31 ./baz -> bar drwxr-xr-x 3 bss03 users 60 Feb 14 15:30 ./foo drwxr-xr-x 2 bss03 users 40 Feb 14 15:30 ./foo/foo $ ln -sf foo baz $ find | xargs ls -ld drwxr-xr-x 4 bss03 users 100 Feb 14 15:31 . drwxr-xr-x 2 bss03 users 60 Feb 14 15:31 ./bar lrwxrwxrwx 1 bss03 users 3 Feb 14 15:31 ./bar/foo -> foo lrwxrwxrwx 1 bss03 users 3 Feb 14 15:31 ./baz -> bar drwxr-xr-x 3 bss03 users 60 Feb 14 15:30 ./foo drwxr-xr-x 2 bss03 users 40 Feb 14 15:30 ./foo/foo $ ln -sf foo/foo baz $ find | xargs ls -ld drwxr-xr-x 4 bss03 users 100 Feb 14 15:31 . drwxr-xr-x 2 bss03 users 60 Feb 14 15:32 ./bar lrwxrwxrwx 1 bss03 users 7 Feb 14 15:32 ./bar/foo -> foo/foo lrwxrwxrwx 1 bss03 users 3 Feb 14 15:31 ./baz -> bar drwxr-xr-x 3 bss03 users 60 Feb 14 15:30 ./foo drwxr-xr-x 2 bss03 users 40 Feb 14 15:30 ./foo/foo See, it will overwrite a link to a directory. -- Boyd Stephen Smith Jr. [EMAIL PROTECTED] ICQ: 514984 YM/AIM: DaTwinkDaddy -- [email protected] mailing list

