Re: Creating hardlinks for directories.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
  Les Mikesell
   lesmikesell@xxxxxxxxx



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux