Operating System User's Guide
Chapter 3, Working with files and directories

Renaming a directory

Renaming a directory

To rename or move a directory, use the mv(C) (move) command, as follows:

mv oldname newname

oldname is the directory's current name, and newname is the new name you want to assign it. As with the mkdir command, arguments to mv may be simple names or pathnames, as follows:

   $ mv users_guide uguide
   $ mv appendix ../docset2/admin_guide/app
The first of these commands renames a subdirectory: the second renames a directory from appendix to app, at the same time moving it to another location.