Moves (renames) a directory.
mvdir Directory1 Directory2
Note: This command has been made obsolete by the mv command.
The mvdir command renames directories within a file system. To use the mvdir command, you must have write permission to Directory1 and Directory2 as well as in the parent directories.
The Directory1 parameter must name an existing directory. If Directory2 does not exist, Directory1 is moved to Directory2. If Directory2 exists, Directory1 becomes a subdirectory of Directory2. Neither directory can be a subset of the other.
The mvdir Command can also be used to move or rename files. If the Directory1 parameter is an existing file name and the Directory2 parameter is an existing directory name, the file specified by Directory1 is moved to the directory specified by Directory2. If the Directory1 parameter is an existing file name and the Directory2 parameter does not yet exist, Directory2 replaces the file name Directory1. If both are existing file names, the file specified by Directory1 is renamed Directory2, and the existing Directory2 is removed.
To rename or move a directory to another location, enter:
mvdir appendixes manual
If manual does not exist, this renames the appendixes directory to manual .
If a directory named manual already exists, this moves appendixes and its contents to manual/appendixes . In other words, appendixes becomes a subdirectory of manual .
|/usr/sbin/mvdir||Contains the mvdir command.|
The mkdir command, mv command.
The rename subroutine.
Directory Overview in AIX Version 4.3 System User's Guide: Operating System and Devices.
File and Directory Access Modes in the AIX Version 4.3 System User's Guide: Operating System and Devices introduces file ownership and permissions to access files and directories.