[Python-Dev] PEP 394 request for pronouncement (python2 symlink in *nix systems) (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Sun Feb 12 18:57:42 CET 2012


Am 12.02.2012 17:04, schrieb Antoine Pitrou:

Le dimanche 12 février 2012 à 16:52 +0100, "Martin v. Löwis" a écrit :

Why hard links? Symlinks are much more introspectable. When looking at a hard link I have no easy way to know it's the same as whatever other file in the same directory.

There actually is an easy way, in regular ls: look at the link count. It comes out of ls -l by default, and if it's >1, there will be an identical file. This doesn't tell me which file it is

Well, you didn't ask for that, it does "to know it's the same as whatever other file" nicely :-)

As Charles-François explains, you can use ls -i for that, which isn't that easy, but still straight-forward.

Regards, Martin



More information about the Python-Dev mailing list