Path: utzoo!attcan!uunet!husc6!ukma!tut.cis.ohio-state.edu!mandrill!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon S. Allbery) Newsgroups: comp.bugs.sys5 Subject: Re: /etc/link problem via /etc/mvdir Message-ID: <7850@ncoast.UUCP> Date: 1 Jun 88 03:19:53 GMT References: <532@etn-rad.UUCP> Reply-To: allbery@ncoast.UUCP (Brandon S. Allbery) Followup-To: comp.bugs.sys5 Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 27 As quoted from <532@etn-rad.UUCP> by markus@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