Re: symlinks
Re: symlinks
- Subject: Re: symlinks
- From: "Mark J. Reed" <email@hidden>
- Date: Sun, 15 Aug 2010 22:03:58 -0400
Hard links are ordinary directory entries. The way you get to any
file on a POSIX filesystem is through a hard link. You always have
one, but you can make more, all of them indistinguishable - there's no
way to say "this is the file's Real name.". But all the links have to
be in the same filesystem.
However, links to directories (folders) are treated special
because a directory "knows" its parent ("..") and is only capable of
having one.. So aside from the automatically-created hard links "."
and ".." that all directories have, they have a unique name. You
can't create new hard links to a directory.
Symbolic links are just files containing the pathname of another
file, but the filesystem calls will automatically follow a chain of
such files to find the target for you. As such, you can have a link
to a file anywhere you can get to with a pathname. And that includes
directories, files on another filesystem, nonexistent files (which of
course trigger an error when you try to dereference them, but not
before).
On Sunday, August 15, 2010, Luther Fuller <email@hidden> wrote:
> On Aug 15, 2010, at 6:55 PM, Tommy Bollman wrote:You create a hard link, that aren't allowed to cross over mounted volumes. That is a symlink is a file, that contains a reference to some i-node on some volume, but a hard link, is an I-node, and will be inserted into the i-node table of the file manager, -and you don't want any inconsistencies in such table, which you get if the volume in speak are unmounted, and therefore the operation is prohibited.
>
> The man page for ln tells me that:1. -s Create a symbolic link.2. Symbolic links may span file systems and may refer to directories.3. Hard links may not normally refer to directories and may not span file systems.
> I think this means that a symbolic link can refer to a folder on an external disk or a non-startup partition.I will have to extend my experiments to include this. We will see what happens, tomorrow.
>
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden