mv(1) CLIX mv(1)
NAME
mv - Moves files
SYNOPSIS
mv [-f] file1 [file2 ... ] target
FLAGS
-f Moves the file, even if the mode of target forbids writing.
DESCRIPTION
The mv command moves file1 to target. Under no circumstance can file1 and
target be the same (take care when using shell metacharacters). If target
is a directory, then one or more files are moved to that directory. If
target is a file, its contents are destroyed.
If mv determines that the mode of target forbids writing, it will display
the mode (see chmod), ask for a response, and read stdin for one line; if
the line begins with y, the mv occurs, if permissible; if not, the command
exits. When the -f flag is used or if stdin is not a terminal, no
questions are asked and the mv is done.
The mv command allows file1 to be a directory, in which case 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.
EXAMPLES
The following moves (renames) /usr/adm/errlog to /usr/adm/OLDerrlog:
mv /usr/adm/errlog /usr/adm/OLDerrlog
NOTES
If file1 and target lie on different file systems, mv must copy the file
and delete the original. In this case, any links with other files are
lost.
DIAGNOSTICS
If one of the source files for mv does not exist, this message is
displayed:
cannot access ______.
2/94 - Intergraph Corporation 1
mv(1) CLIX mv(1)
EXIT VALUES
This command exits with a value of 2 if a problem is encountered.
RELATED INFORMATION
Commands: chmod(1), cp(1), cpio(1), ln(1), rm(1)
2 Intergraph Corporation - 2/94