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

Cameron Simpson cs at zip.com.au
Sun Feb 12 21:30:43 CET 2012


On 12Feb2012 18:57, "Martin v. Löwis" <martin at v.loewis.de> wrote: | 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.

Yeah! Somewhere... :-(

| > 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 :-)

Sure, at the OS level. Not much use for inspection.

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

If the hardlink is nearby. Of course in this example it (almost certainly?) is, but it needn't be. A symlink is a much better solution to this problem because:

IMO a symlink is far and away the better choice in this situation.

Cheers,

Cameron Simpson <cs at zip.com.au> DoD#743 http://www.cskk.ezoshosting.com/cs/

I need your clothes, your boots, and your motorcycle. - Arnold Schwarzenegger, Terminator 2



More information about the Python-Dev mailing list