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

soft links vs hard links (was Re: duplicate binaries)



> 
> dan writes:
> > Shouldn't files like egrep and fgrep be symbolic links to grep, and same
> > for any other program like this?
> 
> What's wrong with hard links for this?

If you have hard links, and replace one of them, you still need to
replace the other one, since it still points to the original file.  If
you have soft links and replace the real file, the soft link points to
the correct file immediately.  In addition, hard links cannot exist
across file systems, which means that if you used them, you would have
to check if both links are on the same file system, and otherways make
a soft link anyway.  This would introduce the need for different
maintenance routines depending on the physical layout of directories on
file systems, which is Definitely Not What You Want.

HTH,
Eric

-- 
 E.L. Meijer (tgakem@chem.tue.nl)          | tel. office +31 40 2472189
 Eindhoven Univ. of Technology             | tel. lab.   +31 40 2475032
 Lab. for Catalysis and Inorg. Chem. (TAK) | tel. fax    +31 40 2455054


Reply to: