**** PRELIMINARY DOCUMENTATION -- PROGRAM NOT YET AVAILABLE *****

NAME
mvdir -- move a directory around within a filesystem

SYNOPSIS
% mvdir <src> <dst>

DESCRIPTION
"mvdir" can be used to move a directory from one  branch  of  the
directory "tree" to another -- that is, it can change the name of
a directory or move it to another parent directory.

The syntax for "mvdir" is the following:
% mvdir pathname pathname
where the first pathname is the name of the existing directory to
be  moved and the second pathname is the new desired pathname for
the directory.  If the named destination exists, "mvdir" will ap-
pend  the last directory name of the source directory to the des-
tination pathname; thus, the command:
% mvdir junk junk2
if "junk2" exists, will be translated into the command:
% mvdir junk junk2/junk

Several restrictions apply to pathnames of both  the  source  and
destination:

   (1) The destination may not be a subdirectory of the source --
   such  a  move would be disastrous in that all of the directory
   would "vanish".
   (2) The source and destination must be on the same filesystem.
   (3) The special directory names "." and ".." may be used,  ex-
   cept   as   the   last  part  of  the  source  pathname,  thus
   "/usr/login-name/sub1/." is illegal as a source.
   (4) The parent directories of both the source and  destination
   must  have  rwx access for the world, be owned by the user, or
   the user must be super-user.
   (5) The source may not be the root (inode 1) of a filesystem.

These restrictions are not as severe as it may  seem  upon  first
reading;  in most cases they prevent undesirable manipulations of
directories.

After all checks have been made, and it is time  for  the  actual
move to occur, "mvdir" will turn off interrupts, quits, and hang-
ups, and will "nice" itself up to -5 so that it can work  quickly
and  without  interruption  unless a major system failure occurs.
As much as possible, "mvdir" will attempt to repair damage caused
by unexpected errors in "link" or "unlink".

DIAGNOSTICS
There are a host of diagnostic messages, all of which  are  fatal
(no   messages   indicates   success).    They  should  be  self-
explanatory.

BUGS
Some of the error correction isn't really complete enough if link
or unlink fails.

