Fred Moore <fmooregcfn.org> wrote:
A "hard link" is a name for a file. When you make a hard link to a file,> Could some knowledgeable UNIX type please explain the differences between
> hard links, soft links, and traditional Mac aliases. Responses which
> include the important ramifications of the differences would be most
you are adding a name for it in the filesystem, which is on equal standing
with the original name -- nether of the two is the "real" filename, they
both are now equally names for the same file.
Technically, every file has at least one hard link -- what you think of as
the filename. It points to the actual data on the disk. If you have more
than one, it's just more than one filesystem entry pointing to the same
A soft link, or "symbolic link", points to another file by name. If you
change the name of the target file, the link becomes invalid, because the
reference it was using was the filename. However, completely changing
the underlying file (including what disk it's on) will not invalidate
the symlink as long as the path name stays the same.
A Mac alias points to another file's data, regardless of the name. Since
it's pointing at the disk data, it becomes invalid if you move the original
file to a different filesystem (a different disk, for example). It will
technically also become invalid if you replace the underlying file but keep
the name the same, but they've worked around that -- if the alias is invalid
but there is a new file in place of the old file, the alias will now refer
to the new file.
This can actually cause confusion; if you have an alias to a file, and you
move the original file to the trash and replace it with a new file (for
example, installing the new version of a program), but you don't empty
the trash, the alias still points to the *old* file, now in the trash,
even though there is a new file with the same name in its place (because
an alias points to the file, not the name). But if you empty the trash,
then use the alias, the Mac will see that its file is gone but a new one
is in its place, and start pointing to that instead.
Those would be files that lost their "link" to the filesystem. What you> I'm pretty familiar with the ins and outs of Mac aliases; but the other
> day I repaired a dual boot Mac using Norton booted into 9.2.2 and it
> generated a file called Lost and Found containing a whole bunch of zero KB
> items labeled 'Hardlink [some long numeric string]'.
have is the data, but none of the metadata, including the filename itself.
It recovered the files themselves but had no idea what files they were, so
they ended up in Lost and Found with random-looking names.
Jeremy | [email]jeremyexit109.com[/email]