link/symbolic link~ What is the differance?
Michael Havens
plug-discuss@lists.plug.phoenix.az.us
Wed, 18 Dec 2002 17:44:54 -0700
That is a perfect understanding David. Thanks.
On Wednesday 18 December 2002 02:04 pm, David Mandala wrote:
> A hard link can ONLY be used on the same file system. A soft link
> (symlink) can span file systems. So if you want to make a link and you
> are on a different file system you have to use a soft link( symlink).
>
> For example here is a df table listing from my machine I'm working on:
>
> /dev/sda3 16990844 5280900 10846852 33% /
> /dev/sda1 124427 20112 97891 18% /boot
> /dev/hda1 29561392 2463484 25596236 9% /usr/local
> none 322000 0 322000 0% /dev/shm
>
> Now if I want to make a link from something in the root file system to
> something in /usr I could use a hard link since they both are in the
> same partition but if I wanted to make a link from a file in /usr/local
> in /usr it would have to be a soft link (symlink) since they are
> different file systems (in fact different drives). Hope that helps.
>
> Cheers,
>
> Davidm
>
> On Wed, 2002-12-18 at 13:22, Michael Havens wrote:
> > If this is the case, what is the bebefit of a sym link?
> > If it's size how much bigger is a hard one?
> > (I am so BAD!)
> >
> > On Wednesday 18 December 2002 11:36 am, David Mandala wrote:
> > > Easiest way to explain the difference is: Hard links must exist on =
the
> > > same file system (ie: partition) and soft links (symlinks) can exis=
t
> > > across partition boundaries. There are other differences but that i=
s
> > > the biggest that you might care about.
> > >
> > > As explained below a hard link is a pointer to data that is already=
on
> > > the drive. The name can be the same or different. With a hard link =
if
> > > the original link is deleted the data remains accessible via the ot=
her
> > > hard links. With a soft link if the original link is deleted the da=
ta
> > > is gone and you have what is known as a hanging sym link, that is a
> > > soft link that is now pointing at nothing. There are tools to scan =
your
> > > drives to locate and delete hanging links. You would be surprised h=
ow
> > > many hanging soft links can accumulate over time!
> > >
> > > There are more differences but I'll leave that to you to discover.
> > >
> > > Cheers,
> > >
> > > Davidm
> > >
> > > On Wed, 2002-12-18 at 11:36, Mike Starke wrote:
> > > > /_> From what I've interpreted from a combination of the info/man
> > > > pages on ln, it /_> seems that without the -s it is just another
> > > > command for copy. /_>
> > > > /_> Is this correct?
> > > > /_
> > > > /_With a hard link, you have pointers to the same data saved at s=
ome
> > > > /_particular location on the disk. So it's technically not a cop=
y.
> > > > /_~M
> > > > /_
> > > > I must admit, I too, never fully understood the differance betwee=
n
> > > > soft & hard links.
> > > >
> > > > -Mike
> > > > ---------------------------------------------------
> > > > PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> > > > To subscribe, unsubscribe, or to change you mail settings:
> > > > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
--=20
:-)~Mike~(-: