lkml.org 
[lkml]   [1998]   [Jan]   [17]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
Subject2.1.76: weird behavior of "ln -sf dir link"
FromVladimir Volovich <>
Date17 Jan 1998 12:58:39 +0300
Hello,

I've found a weird behavior of creating a symbolic links to
directories. If the link to directory already exists, then "ln -sf"
will not be able to change the link:

vvv:/tmp/lns-bug# mkdir dir1 dir2
vvv:/tmp/lns-bug# ln -s dir1 link
vvv:/tmp/lns-bug# ls -l
total 2
drwxr-xr-x   2 root     root         1024 Jan 17 12:52 dir1/
drwxr-xr-x   2 root     root         1024 Jan 17 12:52 dir2/
lrwxrwxrwx   1 root     root            4 Jan 17 12:52 link -> dir1/
vvv:/tmp/lns-bug# ln -sf dir2 link
vvv:/tmp/lns-bug# ls -l
total 2
drwxr-xr-x   2 root     root         1024 Jan 17 12:52 dir1/
drwxr-xr-x   2 root     root         1024 Jan 17 12:52 dir2/
lrwxrwxrwx   1 root     root            4 Jan 17 12:52 link -> dir1/
vvv:/tmp/lns-bug# uname -a
Linux vvv 2.1.76 #1 Fri Dec 26 22:58:33 MSK 1997 i586
vvv:/tmp/lns-bug#

Haven't tested this on newer kernels yet. :)

	Best regards, -- Vladimir.
-- 
Factorials were someone's attempt to make math LOOK exciting.

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:0.268 / U:0.120 seconds]
©2003-2008 Jasper Spaans