Axalon wrote:
> 
> 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
> 

Okay, I'll try that (after all, I should be able to reproduce any time).

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

Okay, is there a specific reason for this, that you would care to share
?
(I mean, at first glance it doesn't look very obvious, does it ???)

 
Even then, shouldn't there be a difference between _hard_ links (where
AFAIK there are use counters to maintain) and _symbolic_ links, where
there are no such counters so you can safely clear the inode every time
?
 
I quote from Unix unleashed third edition....(nice book just don't drop it
on your toe)

"With hard links ,the original filename and the linked filename point to
the same physical address and are absolutely identical. There are two
important limitations of a hard link. A directory cannot have a hard link ,
and it cannot cross a file system. It is possible to delete the original
filename without deleting the linked filename. Under such circumstances,
the file is not deleted, but the directory entry of the original file is
deleted, and the link count is decremented by 1. The data blocks of the
file are deleted when the link count becomes zero.

With symbolic links there are two files: one is the original file, and the
other is the linked filename containing the name of the original file. An
important limitation of the symbolic link is that you may remove the
original file, and it will cause the linked filename to be there, but
without any data. However, a symbolic linked filename can cross  file systems.
 
Be careful about symbolic links. If you are not, you will be left with
files that do not point anywhere because the original file has been deleted
or renamed.An important feature of the symbolic link is that it can be used
to link directories as well as files. "

Reply via email to