mvdir able to move /etc

ian at sq.UUCP ian at sq.UUCP
Thu Jan 15 03:30:35 AEST 1987


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.



More information about the Comp.bugs.sys5 mailing list