Next: 1.4.17 ps
Up: 1.4 Man Pages
Previous: 1.4.15 more
 
Contents
- NAME
-
mv - rename files
- SYNOPSIS
-
mv [options] source dest mv [options] source... directory
Options: [-bfiuv] [-S backup-suffix] [-V {numbered,existing,sim-
ple}] [-backup] [-force] [-interactive] [-update]
[-verbose] [-suffix=backup-suffix] [-version-con- trol={numbered,existing,simple}]
[-help] [-version]
DESCRIPTION
This documentation is no longer being maintained and may be inaccurate
or incomplete. The Texinfo documentation is now the authoritative
source.
This manual page documents the GNU version of mv. If the last argument
names an existing directory, mv moves each other given file into a
file with the same name in that directory. Otherwise, if only two
files are given, it moves the first onto the second. It is an error
if the last argument is not a directory and more than two files are
given. It can move only regular files across filesystems. If a destination
file is unwritable, the standard input is a tty, and the -f or -force
option is not given, mv prompts the user for whether to overwrite
the file. If the response does not begin with `y' or `Y', the file
is skipped.
- OPTIONS
-
- -b, -backup
- Make backups of files that are about to be removed.
- -f, -force
- Remove existing destination files and never prompt
the user.
- -i, -interactive
- Prompt whether to overwrite each destination
file that already exists. If the response does not begin with `y'
or `Y', the file is skipped.
- -u, -update
- Do not move a nondirectory that has an existing destination
with the same or newer modification time.
- -v, -verbose
- Print the name of each file before moving it.
- -help
- Print a usage message on standard output and exit successfully.
- -version
- Print version information on standard output then exit
successfully.
- -S, -suffix
- backup-suffix The suffix used for making simple backup
files can be set with the SIMPLE_BACKUP_SUFFIX environment variable,
which can be overridden by this option. If neither of those is given,
the default is `', as it is in Emacs.
- -V, -version-control
- {numbered,existing,simple} The type of
backups made can be set with the VERSION_CONTROL environment variable,
which can be overridden by this option. If VERSION_CONTROL is not
set and this option is not given, the default backup type is `existing'.
The value of the VERSION_CONTROL environment variable and the argument
to this option are like the GNU Emacs `version-control' variable;
they also recognize synonyms that are more descriptive. The valid
values are (unique abbreviations are accepted):
- [`t']or `numbered' Always make numbered backups.
- [`nil' or` existing']Make numbered backups of files that already
have them, simple backups of the others.
- [`never' or `simple']Always make simple backups.
- EXAMPLES
-
Rename thisfile to thatfile
$ mv thisfile thatfile
Move a file from one directory to another. You only have to give the
path to the new place, the file name will be the same, unless you
choose to change it.
$ mv thisfile /home/joe/
Next: 1.4.17 ps
Up: 1.4 Man Pages
Previous: 1.4.15 more
 
Contents