Re: symlinks
Re: symlinks
- Subject: Re: symlinks
- From: Emmanuel LEVY <email@hidden>
- Date: Mon, 16 Aug 2010 12:14:39 +0200
I think one of the stakes should be emphasized more, it's when you say
nonexistent files (which of
course trigger an error when you try to dereference them, but not
before).
In my experience, I have to dereference non-existing files as well as
existing files. In fact, whether the file exists or not is handled as
late as possible in the process.
So if fred is a symlink, I do have to dereference without error a
reference such as:
/bla[1]/foo/bar/what/ever/fred/some/folder/some/file
Emmanuel
[1] Linguistic note: "bla" is French for "blah"
On Aug 16, 2010, at 4:03 AM, Mark J. Reed wrote:
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 (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to 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