/etc/link problem via /etc/mvdir

Brandon S. Allbery allbery at ncoast.UUCP
Wed Jun 1 13:19:53 AEST 1988


As quoted from <532 at etn-rad.UUCP> by markus at etn-rad.UUCP (Markus Richardson):
+---------------
| I did something dangerous/stupid but only realized it after the fact.  
| my . directory looked something like:
| 	dir1/  dir2/  dir3/  dir4/  dir5/  dir6/  dir7/  dir8/  dir9/
| 
| I entered '/etc/mvdir * dir9' thinking (ala /bin/mv) that /etc/mvdir
| and /etc/link would be smart enough to catch that I was trying to
| link a directory (namely dir9) to itself.  Well, after no error message I 
| got alittle panicky and of course did a /bin/ls.  Nothing in the . directory!
+---------------

Check the man pages.  /etc/link is a pure link(2) with NO CHECKING WHATSOEVER
-- it is a tool for repairing a filesystem, NOT intended for general use.

Moral:  be VERY careful when using /etc/mvdir, /etc/link, or /etc/unlink:
these programs deliberately violate the rules which are intended to maintain
the "directed acyclic graph" which is the Unix filesystem, and using them
without caution will cause massive disasters.

(SVR3'ers can ignore the warning about "mvdir", I think:  any system which
implements mkdir(2) and rmdir(2) as primitives should be able to handle
moving directories around a filesystem.  But Plexii run SVR2.)
-- 
	      Brandon S. Allbery, moderator of comp.sources.misc
	{well!hoptoad,uunet!marque,cbosgd,sun!mandrill}!ncoast!allbery
Delphi: ALLBERY						     MCI Mail: BALLBERY



More information about the Comp.bugs.sys5 mailing list