On Mon, Sep 22, 2014 at 4:43 PM, Nathan McCorkle <[email protected]> wrote:

> A symlink is basically a shortcut file that points to another file. My
> basic understanding is when a symlink is removed, the real file isn't
> touched, but if you use a hardlink to make the shortcut, if you remove
> the hardlink the real file also gets removed.

Removing the hardlink does not remove the real file, unless it is the
last link to the "real file" (or inode).

A symlink is the file system holding a name that redirects to the
other filename.  The other filename doesn't even need to exist.

A hard link is just another name that points at the inode.  The inode
is the filesystem object that holds the content of the file.  The
inode keeps a reference count, when it goes to zero (or something like
that) the inode releases the blocks associated with the content of the
file. There is no hierachy in hardlinks, one is treated the same as
any other.  You can create a hardlink to a file and then remove the
original filename and the hardlink survives.  The ls -l command will
show you the reference count associated with a file.
_______________________________________________
dorkbotpdx-blabber mailing list
[email protected]
http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber

Reply via email to