Symlinks already present

Grant Edwards grant.b.edwards at gmail.com
Mon Jul 27 18:19:10 EDT 2020


On 2020-07-27, Termoregolato <waste at is.invalid> wrote:
> Il 26/07/20 22:47, dn ha scritto:
>
>> Thus, compare the results of the two calls to detect a difference.
>
> I will try also another way, If I don't err symlinks and original 
> directory  have the same inode number (I talk about Linux, where I'm 
> using the application).

You err.  Symlinks are distinct i-nodes which are not the same i-node
as the destination.  A symlink is basically a file containing a string
that is read and then used a path to another file.

If you create a "hard" link (ln without the '-s') then you end up a single 
i-node that has entries in multiple directories.

[old-Unix-guy story: Way back when, SunOS used to allow you (if root)
to create a hard link to a directory.  It's not something you did a
second time.]







More information about the Python-list mailing list