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

Aidan Kehoe kehoea at parhasard.net
Sat Jul 20 22:22:53 IST 2002


 Ar an 20u la de mi 7, scriobh kevin lyda :

 > On Sat, Jul 20, 2002 at 08:24:47PM +0100, Aidan Kehoe wrote:
 > >  Ar an 20u la de mi 7, scriobh kevin lyda :
 > >  > actaully i think soft links were invented because you can't hard link
 > >  > directories. 
 > > But you could hard link directories, back when soft links were
 > > being invented, AFAIK. 
 > 
 > that was before my time.  all unix systems i've used didn't allow hard
 > links to directories, or if they did they were restricted to root.
 > the reason why is because you could cause infinite loops in the kernel -
 > usually a bad place for infinite loops.

Yeah, thanks. I have been subscribed for more than a week, despite any
naïvete I may be showing to you :-) . 

 > >  > apparently some systems limited soft links to the same device but
 > >  > gave up after a while.  
 > > Why?
 > 
 > to make them consistent with hard links.

So, they're the same as hard links, with the disadvantage that they
break on deletion or moving, and they may take up slightly more disk
space. Hmm.

 > > A better way of doing it would be a) have global unique filesystem
 > > identifiers for every FS created (such that the chance of two of them
 > > clashing is miniscule; 64 bits creatively used would do it, I'd say),
 > > and b) implement the target info for the soft link as a {FSID, inode}
 > > pair; the OS can work out if the thing linked to is now on a different
 > > mount point, or has been moved. (HFS fans, is that what's done? Or are
 > > aliases implemented differently?)
 > 
 > let's call these super-soft-links.  ln -ss
 > 
 >     % ln -ss foo bar
 >     % ls -i foo
 >     111 foo
 >     % mv floyd foo
 >     % ls -i foo
 >     222 foo
 > 
 > and now bar no longer points to foo.

True. But "cat floyd > foo; rm floyd" preserves it. Much of a muchness
...

 > the fs would need to maintain a table of links going the other direction.
 > so when the move command unlinks foo in the first example, it could
 > check the table and mark that bar is now disconnected.  the same would
 > be true for the second example - and even more important since bar points
 > to floyd if no table is consulted.
 > 
 > and this all fails to handle nfs mounted file systems or filesystems
 > that have dynamic inodes (the fat fs's and reiser lacks inodes i think).

Hokay. 

-- 
I'm not a pheasant plucker / I'm a pheasant plucker's son.
I'm just a'plucking pheasants / 'Til the pheasant plucker comes.




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