Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!utcs!utfyzx!sq!ian
From: ian@sq.UUCP
Newsgroups: comp.bugs.sys5
Subject: Re: mvdir able to move /etc
Message-ID: <1987Jan14.123035.20364@sq.uucp>
Date: Wed, 14-Jan-87 12:30:35 EST
Article-I.D.: sq.1987Jan14.123035.20364
Posted: Wed Jan 14 12:30:35 1987
Date-Received: Thu, 15-Jan-87 01:18:39 EST
References: <376@oblio.UUCP>
Reply-To: ian@sq.UUCP (Ian F. Darwin)
Organization: SoftQuad Inc., Toronto
Lines: 26
Checksum: 30064
Summary: mvdir considered harmful

In my humble opinion, the very *existence* of mvdir as separate
from the normal mv command is a bug.

There is nothing in the filesystem that prevents a C program
from moving a directory from point A to point B in one filesystem.
But the System V mv command only moves directories laterally
(i.e., will only rename them within the same parent directory).

And I can see no reason that Joe User should have to come begging
to the superuser everytime he wants to make a trivial change
in his directory structure. If Joe User can rm his directories with
rmdir, why can't he move them? (on SV and SVR2, mvdir is rwxr--r--,
so only the superuser can move directories).

Seventh Edition UNIX had this facility (i.e., a mv command that
worked); in fact if you are source licensed for various UNIX source
versions you can run the V7 mv on system V and use it instead of mvdir.
I tried it once (when I worked at UofT and had source access) and it
worked; this is not a warranty that it will work on all versions of
System V for all time.

Seventh Edition UNIX came out in 1979 - hey, that's eight 
years ago. Too bad System V hasn't caught up technically.

As an exercise for the reader: write a C program that does
what mvdir does. You have to be root to run it, of course.