mv moves files and directories around in the file system. A side effect of mv is to rename a file or directory. The three major forms of mv are shown in the synopsis above.
The first form of mv moves (changes the name of) filename1 to filename2. If filename2 already exists, it is removed before filename1 is moved. If filename2 has a mode which forbids writing, mv prints the mode (see chmod.2v and reads the standard input to obtain a line; if the line begins with y, the move takes place, otherwise mv exits.
The second form of mv moves (changes the name of) directory1 to directory2, only if directory2 does not already exist -- if it does, the third form applies.
The third form of mv moves one or more filenames (may also be directories) with their original names, into the last directory in the list.
mv refuses to move a file or directory onto itself.
If filename1 and filename2 are on different file systems, then mv must copy the file and delete the original. In this case the owner name becomes that of the copying process and any linking relationship with other files is lost.
Modification times may be different than expected when mv must copy the file's data, rather than simply updating a directory entry.
mv will not move a directory from one file system to another. Use cp.1 instead.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97