Creating hardlinks for directories.

Vikram Goyal vikigoyal at gmail.com
Mon Jan 16 11:50:53 UTC 2006


-----Original Message-----
From: Les Mikesell <lesmikesell at gmail.com>
Sent: Sun, Jan 15, 2006 at 12:28:36PM -0600
To For users of Fedora Core releases
Subject: Re: Creating hardlinks for directories.


> On Sun, 2006-01-15 at 10:36, Vikram Goyal wrote:
> > > > > >
> > > > > > I wanted to create hardlinks for directories on the same file system.
> > > > > > I know it's not allowed. But the man page for ln says one may. Now I
> > > > > > want to know how may one switch it on.
> > > > > >
> > > > > > Also what could be the pitfalls.
> > > > > >
> > > > > mount --bind /source /target
> > > > > 
> > > > > works well for me)
> > > > > 
> > > > 
> > > > Thanks! but it mounts a section of the dir hierarchy on another dir and
> > > > will get dismounted on shutdown. Also only root may do it.
> > > > 
> > > > I wanted to make permanent links which may or may not be subjected to
> > > > frequent deletions etc. and which I as a normal user could execute i.e.
> > > > from some scripts.
> > > 
> > > Why not use symlinks instead?  They work fine for directories
> > > as long as you remember which is the real one and which is
> > > the link (or check with 'ls -l' so you know what to expect
> > > from deletion.
> > > 
> > 
> > Yes that's what I was doing but something cropped up which needed this.
> > At least this is the only solution to that particular problem whether
> > I'm able to do it or not.
> 
> It is probably worth trying to come up with a different approach
> since the side effects of directory hardlinks will almost certainly
> be worse that the workarounds you might need to live with symlinks.
> Can you describe the problem you would have with symlinks? 
> Sometimes it helps to reverse the symlink and real locations.
> 

Well, it goes like this. I use mutt which is very good piece of software
for dealing with lists like fedora and in general reading list mails,
with threading etc, once one has mastered the keystrokes.

The big problem with it is that it's very difficult to configure and one
has to tweak it's nose, ear, tail etc everytime something outof default
from one's setup crops up. So I started configuring it through scripts
which would scan the mailbox and configure it before starting. Then I
thought others may take the benefit from the scripts, so I wrote them
for general usage and inbetween I inserted a bit of code which would
create a pseudo mailfolder which could be used by evolution to read the
same mails. Till now evolution was behaving sanely and creating it's
index files in the pseudo folder but recently its coder went ahead and
changed code where it would follow the symlink even when told explictly
that pseudo mailfolder is the folder of the mails. I think this is bad
practise and destroys the concept soft linking and sane programming.
Anyways the only solution which I think out of this is:

1} I let it remain like this. The mutt shows the index files in dir mode
and which make the display ugly and also the mutt mailfolder is littered
with index files.

1} I remove the code which creates the pseudo mailfolder. Then one may
use mutt or evolution but not both.

3} I do some jugglery which fools evolution and forces it to create the
indexes in the pseudo mailfolder only.

I hope it's intelligible. Whew...
-- 
vikram...
         ||||||||
         ||||||||
^^'''''^^||root||^^^'''''''^^
        // \\   ))
       //(( \\// \\
      // /\\ ||   \\
     || / )) ((    \\
-- 
Trying to define yourself is like trying to bite your own teeth.
		-- Alan Watts
-- 
~|~
 =
Registered Linux User #285795




More information about the fedora-list mailing list