Ralph Shumaker wrote:
> James G. Sack (jim) wrote:
>> Ralph Shumaker wrote:
>>  
>>> James G. Sack (jim) wrote:
>>>    
>>>> Ralph Shumaker wrote:
>>>> ..
>>>> If you delete, rename, or move the target, the link is untouched. I'm
>>>> not sure if this is a universally accepted term, but I call it a "stale
>>>> link".
>>>>         
>>> Is there any such thing as a link whose link will follow the target?
>>>     
>>
>> I am not aware of such. Do they do that in other OS's?
>>
>> Of course, if the target and link are (files only, not dirs) on the same
>> filesystem, you can just use a hardlink. Maybe that's more like what you
>>  want?
>>
>> Regards,
>> ..jim
>>   
> 
> I don't know.  What is the difference between a hard link and a soft one?

A symlink is like a DOS shortcut -- the link is simply a file which
contains the pathname of the target. A hard link is a directory entry
that points to the same location on the disk that contains the target
file (technically it points to the inode of the target file).

You might get some of the distinction by reading the man page:
 man ln

A hard link can only be made to a file (not a dir). Each hard link
directory entry name is independent of the names stored in the other
directory entries. If you move a file (within a filesystem), only the
(one) filename is changed. The inode stays the same, so the other links
see no change. If you move a file to another filesystem, the contents of
the file are written to a new file on that other filesystem, and the old
 directory entry is unlinked.

ls -i shows inodes. ls -l shows hardlink counts (just before the size).

Regards,
..jim

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie

Reply via email to