LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] How to copy some files

[ILUG] How to copy some files

Niall O Broin niall at linux.ie
Sat Jul 20 09:46:43 IST 2002


On Fri, Jul 19, 2002 at 08:48:40PM +0100, Ronan Cunniffe wrote:
> Quoting Ronan Waide <waider at waider.ie>:
> 
> > Sure, but soft links would do the same. To be honest, I'm trying to
> > think of a useful use of hard links right now, and I'm a little
> > stumped. There's gotta be some benefit that I'm missing that's
> > immediately obvious to everyone.
> 
> Using Niall's example - single set of files but >1 namespace, and suppose that
> you want to delete some items from the set according to rules applied to the
> namespaces.  With soft links you need an *extra* namespace the others refer to,
> and after filtering the namespaces, you have to do a manual reference count to
> decide what goes and what stays.  With hard links, you just unlink and deletion
> is automatic.

Couldn't have put it better myself, but that's not going to stop me trying :-) 
The above situation occurs precisely because of the major functional difference
between symbolic links (AKA soft links, or symlinks to their friends) and hard
links. Two hard links to the same file are exactly equivalent - one is no more
the files "real" directory entry than is the other. OTOH a symlink is a special
thing which is a link to a real file, and when the file linked to is erased, you
end up with a broken symbolic link - you can't have a broken hard link (except
of course in the case of a banjaxed filesystem).


Niall




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell