11/3/71                                                    MV (I)

NAME            mv  --  move or rename a file

SYNOPSIS        mv name  name  ... ...
                       1     2

DESCRIPTION     mv changes the name of name  by linking to it un-
                der the name name  and then unlinking name .
                                 2                        1
                Several pairs of arguments may be given.  If the

                new name is a directory, the file is moved to

                that directory under its old name.  Directories

                may only be moved within the same parent direc-

                tory (just renamed).

FILES           --

SEE ALSO        --

DIAGNOSTICS     "?a"-- incorrect argument count

                "?d"-- attempt to move a directory

                "?s"-- moving file to itself

                "?l"-- link error; old file doesn't exist or

                       can't write new directory

                "?u"-- can't unlink old name

BUGS            If mv succeeds in removing the target file, but

                then in unable to link back to the old file, the

                result is ?l and the removal of the target file.

                This is common with demountable file systems and

                should be circumvented.  Also in such cases, mv

                should copy if it can.

OWNER           ken, dmr