Talk:Hard link

From Wikipedia, the free encyclopedia

This article is within the scope of WikiProject Computer science, which aims to create a comprehensive computer science reference for Wikipedia. Visit the project page for more information and to join in on related discussions.
Start rated as Start-Class on the assessment scale
Mid rated as Mid-importance on the assessment scale

This article is really pedantic. Instead of "a reference, or pointer, to physical data on a storage volume", why not just say "a reference to a file"? Why not say "file" or "file inode" instead of "physical data section"? It should say that you can't create (additional) hard links to directories. Are there any systems where that is not the case? —Preceding unsigned comment added by PGibbons (talkcontribs)

[edit] Drawbacks

How is it a drawback that hard links can only be created whithin a single partition? It is a drawback as much as not writing red is a drawback of a blue pen. If partition 1 holds physically data A, to which filename A (in partition 1) points, and partition 2 contains filename B, which is a hard link to data A... how would be mounting and unmounting of partition 2 be handled? Data A is defined as deleted when all hard links to it are removed. If filename A is removed, and B is not, but partition 2 is unmounted... what happens to data A? Is is accesible again when partition 2 is mounted? And if partition 1 is unmounted, but partition 2 is not... would filename B be a dangling link, as if it where a symlink? And if another partition is mounted in the mountpoint partition 1 had? Now the link would have to "remember" physical partitions, not filesystems (as the soft link does)... bizarre and silly. —Preceding unsigned comment added by Isilanes (talkcontribs)

While it might seem blatently obvious to those that understand computers particularly well enough to get by on their own, it may not seem so for those which aren't. Suppose you never saw a pen before, if you were to see someone writing in red instead of blue, you might wonder why you can't write in red as well. --Mike 04:29, 2 December 2006 (UTC)

Under "Drawbacks of hard links" someone wrote:

To ignore links is sometimes necessary to avoid endless recursion.

This is irrelevant because only files can be hard-linked, not directories. To repeat the above question, are there systems where you can hard-link directories? --- Dse 06:32, 2 January 2007 (UTC)

Windows can have hardlinks accross partitions just fine. And while you can not use hard-links on directories, they are related to junctions, in effect hard-links for directories. 4.160.246.72 21:32, 5 July 2007 (UTC)
  • This is not possible unless you allow filenames on one partition to point to data in another partition, which is a severe negligence (unless they are soft links). If filename A in partition 1 and filename B in partition 2 are both hard links to data D... in which partition does D physically reside? If the answer is "both", then the files are not hard links: they are two regular files. If the answer is partition A but not B, then all hard links are not equivalent (which is a feature of actual hard links). In that case, A would be a regular file, and B would be a soft link. For example, would removing filename A delete the actual data D? It should, because for the filesystem the last link to the data (filename A) has been deleted (partition 2 could even be unmounted). But then, filename B would be pointing to an empty location (just like a soft link). — isilanes (talk|contribs) 15:51, 6 July 2007 (UTC)

[edit] NTFS to and/or from?

For Windows, do both source and destination need to be NTFS? Or just source? — 123.243.204.44 (talk) 01:42, 18 November 2007 (UTC)

Hum, the article says (and already did so when you posted) "On Microsoft Windows, hard links can be created only on NTFS volumes", and "Hard links can only refer to data that exists on the same file system. --Jerome Potts (talk) 09:50, 24 January 2008 (UTC)

[edit] locating hard links on a system

is there a way to find out whether there are any multiple hard-linked files on a system? --Jerome Potts (talk) 09:54, 24 January 2008 (UTC)