Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mvdir(1M) — HP-UX 9.10

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cp(1)

mkdir(1)

mv(1)

mvdir(1M)

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 refuses to move dir if the path specified by newdir would be a descendent directory of the path specified by dir. Such cases are not allowed because cyclic sub-trees would be created as in the case, for example, of mvdir x/y x/y/z/t which is prohibited. 

mvdir does not allow directory .  to be moved. 

Only users who have appropriate privileges can use mvdir. 

EXTERNAL INFLUENCES

International Code Set Support

Single- and multi-byte character code sets are supported. 

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 reports an error, but mvdir x/y ./x/y/z/t (effectively the same command) does not, and a cyclic sub-tree results.  Be very careful when using the names .  and ..  while moving directories.  It is possible to move .  by using another name which specifies the current working directory, as in the example, mvdir ./subdir/.. newdir. 

SEE ALSO

cp(1), mkdir(1), mv(1). 

STANDARDS CONFORMANCE

mvdir: SVID2

Hewlett-Packard Company  —  HP-UX Release 9.10: April 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026