Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - strange behavior of "ln -s": (3 Items)
   
strange behavior of "ln -s"  
Hi,

I'm encountering strange behavior of ln when creating symbolic links.
It seems the symbolic link is always placed inside the target directory, pointing to itself.

I'm testing this on an ETFS file system:
# mkdir /fs/etfs/test
# ls -l /fs/etfs/
[..]
drwxrwxrwx  2 root      0                 0 May 13 10:10 test
[..]
# pwd
/fs/etfs
# ln -s link1 /fs/etfs/test
# ls -l link1
ls: No such file or directory (link1)
# ls -l /fs/etfs/test/
total 1
lrwxrwxrwx  1 root      0                 5 May 13 10:12 link1 -> link1
# ln -s /fs/etfs/link2 /fs/etfs/test
# ls -l /fs/etfs/link2
ls: No such file or directory (/fs/etfs/link2)
# ls -l /fs/etfs/test
total 2
lrwxrwxrwx  1 root      0                 5 May 13 10:12 link1 -> link1
lrwxrwxrwx  1 root      0                14 May 13 10:13 link2 -> /fs/etfs/link2
#

Is this a problem of ln or a file system problem?

Thanks,
 Marc
Re: strange behavior of "ln -s"  
Hi Marc,

You should get better result with 'ln -s /fs/etfs/test link1' (you have inverted target and link name).

Christophe Hannoyer
Re: strange behavior of "ln -s"  
d'oh!

Thanks.