88 lines
2.8 KiB
Groff
88 lines
2.8 KiB
Groff
.TH MV 1L \" -*- nroff -*-
|
|
.SH NAME
|
|
mv \- rename files
|
|
.SH SYNOPSIS
|
|
.B mv
|
|
[options] source dest
|
|
.br
|
|
.B mv
|
|
[options] source... directory
|
|
.br
|
|
Options:
|
|
.br
|
|
[\-bfiuv] [\-S backup-suffix] [\-V {numbered,existing,simple}]
|
|
[\-\-backup] [\-\-force] [\-\-interactive] [\-\-update] [\-\-verbose]
|
|
[\-\-suffix=backup-suffix] [\-\-version-control={numbered,existing,simple}]
|
|
.SH DESCRIPTION
|
|
This manual page
|
|
documents the GNU version of
|
|
.BR mv .
|
|
If the last argument names an existing directory,
|
|
.B 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.
|
|
.P
|
|
If a destination file is unwritable, the standard input is a tty, and
|
|
the \fI\-f\fR or \fI\-\-force\fR option is not given,
|
|
.B mv
|
|
prompts the user for whether to overwrite the file. If the response
|
|
does not begin with `y' or `Y', the file is skipped.
|
|
.SS OPTIONS
|
|
.TP
|
|
.I "\-b, \-\-backup"
|
|
Make backups of files that are about to be removed.
|
|
.TP
|
|
.I "\-f, \-\-force"
|
|
Remove existing destination files and never prompt the user.
|
|
.TP
|
|
.I "\-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.
|
|
.TP
|
|
.I "\-u, \-\-update"
|
|
Do not move a nondirectory that has an existing destination with the
|
|
same or newer modification time.
|
|
.TP
|
|
.I "\-v, \-\-verbose"
|
|
Print the name of each file before moving it.
|
|
.TP
|
|
.I "\-S, \-\-suffix backup-suffix"
|
|
The suffix used for making simple backup files can be set with the
|
|
.B 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.
|
|
.TP
|
|
.I "\-V, \-\-version-control {numbered,existing,simple}"
|
|
The type of backups made can be set with the
|
|
.B VERSION_CONTROL
|
|
environment variable, which can be overridden by this option. If
|
|
.B VERSION_CONTROL
|
|
is not set and this option is not given, the default backup type is
|
|
`existing'. The value of the
|
|
.B 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):
|
|
.RS
|
|
.TP
|
|
`t' or `numbered'
|
|
Always make numbered backups.
|
|
.TP
|
|
`nil' or `existing'
|
|
Make numbered backups of files that already
|
|
have them, simple backups of the others.
|
|
.TP
|
|
`never' or `simple'
|
|
Always make simple backups.
|
|
.RE
|
|
.PP
|
|
The long-named options can be introduced with `+' as well as `\-\-',
|
|
for compatibility with previous releases. Eventually support for `+'
|
|
will be removed, because it is incompatible with the POSIX.2 standard.
|