MV(1) SysV MV(1)
NAME
mv - move files
SYNOPSIS
mv [ -f ] file1 [ file2 . . . ] target
mv dir1 dir2
DESCRIPTION
Mv moves file(s) to a specified target. Under no circumstances can any
of the files being manipulated be the same as the target, so take care
when using shell metacharacters. If target is a directory, then the
file(s) are moved to that directory. If target is a file, its old
contents are replaced by the contents of file.
If mv determines that the mode of target forbids writing, it prints the
mode, asks for a response, and reads the standard input for one line. If
that line begins with y, the operation occurs if it is permissible; if
not, mv exits. If the standard input is not a terminal, or if the -f
(force) option is used, the mv is performed, if permitted, with no
questions asked.
If file1 is a directory, the directory rename occurs only if the two
directories have the same parent; file1 is renamed target. If file1 is a
file and target is a link to another file with links, the other links
remain and target becomes a new file. If target is not a file, mv
creates a new file with the same mode as file1. The owner and group of
target are those of the user. If target is a file, moving a file into
target does not change target's mode, owner, or group. The cp(1) command
sets the last modification time of target, (and last access time, if
target did not exist). If target is a link to a file, all links remain
and the file is changed.
OPTIONS
-f Forces the operation if it is permissable. Does not ask for
confirmation.
SEE ALSO
chmod (1)
cp (1)
cpio (1)
rm (1)