MVDIR(1M) — HP-UX
NAME
mvdir − move a directory
SYNOPSIS
/etc/mvdir dir newdir
DESCRIPTION
Mvdir moves one directory tree into another existing directory (within the same file system), or renames a directory without moving it.
Dir must be an existing directory.
If newdir does not exist but the directory that would contain it does, dir is moved and/or renamed to newdir. Otherwise, newdir must be an existing directory not already containing an entry with the same name as the last pathname component of dir. In this case, dir is moved and becomes a subdirectory of newdir. The last pathname component of dir is used as the name for the moved directory.
Mvdir will refuse to move dir if the path specified by newdir would be a descendant directory of the path specified by dir. (For example, mvdir x/y x/y/z/t is prohibited.) Such cases are not allowed because cyclic sub-trees would be created.
Mvdir will not allow "." to be moved.
Only the super-user can use mvdir.
WARNINGS
The restriction on names is intended to prevent the creation of cyclic sub-trees that may be inaccessible. Mvdir checks for such cases strictly by name, thus creating such a sub-tree is still possible. For example, "mvdir x/y x/y/z/t" will report an error, but "mvdir x/y ./x/y/z/t" (effectively the same command) will not, and a cyclic sub-tree will result. The super-user is cautioned to be very careful in the use of the names "." and ".." while moving directories. It is possible to move "." by using another name which specifies the current working directory, for example, "mvdir ./subdir/.. newdir".
SEE ALSO
INTERNATIONAL SUPPORT
8-bit filenames.
Hewlett-Packard Company — Version B.1, April 12, 1993