| 1 |
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1. |
| 2 |
.TH MV "1" "February 2026" "GNU coreutils 9.10" "User Commands" |
| 3 |
.SH NAME |
| 4 |
mv \- move (rename) files |
| 5 |
.SH SYNOPSIS |
| 6 |
.B mv |
| 7 |
[\fI\,OPTION\/\fR]... [\fI\,-T\/\fR] \fI\,SOURCE DEST\/\fR |
| 8 |
.br |
| 9 |
.B mv |
| 10 |
[\fI\,OPTION\/\fR]... \fI\,SOURCE\/\fR... \fI\,DIRECTORY\/\fR |
| 11 |
.br |
| 12 |
.B mv |
| 13 |
[\fI\,OPTION\/\fR]... \fI\,-t DIRECTORY SOURCE\/\fR... |
| 14 |
.SH DESCRIPTION |
| 15 |
.\" Add any additional description here |
| 16 |
.PP |
| 17 |
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY. |
| 18 |
.PP |
| 19 |
Mandatory arguments to long options are mandatory for short options too. |
| 20 |
.TP |
| 21 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv--backup'\fB\-\-backup[=CONTROL]\fP\X'tty: link' |
| 22 |
make a backup of each existing destination file |
| 23 |
.TP |
| 24 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-b'\fB\-b\fP\X'tty: link' |
| 25 |
like \fB\-\-backup\fR but does not accept an argument |
| 26 |
.TP |
| 27 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv--debug'\fB\-\-debug\fP\X'tty: link' |
| 28 |
explain how a file is copied. Implies \fB\-v\fR |
| 29 |
.TP |
| 30 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv--exchange'\fB\-\-exchange\fP\X'tty: link' |
| 31 |
exchange source and destination |
| 32 |
.TP |
| 33 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-f'\fB\-f, \-\-force\fP\X'tty: link' |
| 34 |
do not prompt before overwriting |
| 35 |
.TP |
| 36 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-i'\fB\-i, \-\-interactive\fP\X'tty: link' |
| 37 |
prompt before overwrite |
| 38 |
.TP |
| 39 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-n'\fB\-n, \-\-no\-clobber\fP\X'tty: link' |
| 40 |
do not overwrite an existing file |
| 41 |
.PP |
| 42 |
If you specify more than one of \fB\-i\fR, \fB\-f\fR, \fB\-n\fR, only the final one takes effect. |
| 43 |
.TP |
| 44 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv--no-copy'\fB\-\-no\-copy\fP\X'tty: link' |
| 45 |
do not copy if renaming fails |
| 46 |
.TP |
| 47 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv--strip-trailing-slashes'\fB\-\-strip\-trailing\-slashes\fP\X'tty: link' |
| 48 |
remove any trailing slashes from each SOURCE argument |
| 49 |
.TP |
| 50 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-S'\fB\-S, \-\-suffix=\,SUFFIX\fP\X'tty: link'\/\fR |
| 51 |
override the usual backup suffix |
| 52 |
.TP |
| 53 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-t'\fB\-t, \-\-target\-directory=\,DIRECTORY\fP\X'tty: link'\/\fR |
| 54 |
move all SOURCE arguments into DIRECTORY |
| 55 |
.TP |
| 56 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-T'\fB\-T, \-\-no\-target\-directory\fP\X'tty: link' |
| 57 |
treat DEST as a normal file |
| 58 |
.TP |
| 59 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv--update'\fB\-\-update[=UPDATE]\fP\X'tty: link' |
| 60 |
control which existing files are updated; |
| 61 |
UPDATE={all,none,none\-fail,older(default)} |
| 62 |
.TP |
| 63 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-u'\fB\-u\fP\X'tty: link' |
| 64 |
equivalent to \fB\-\-update\fR[=\fI\,older\/\fR]. See below |
| 65 |
.TP |
| 66 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-v'\fB\-v, \-\-verbose\fP\X'tty: link' |
| 67 |
explain what is being done |
| 68 |
.TP |
| 69 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-Z'\fB\-Z, \-\-context\fP\X'tty: link' |
| 70 |
set SELinux security context of destination file to default type |
| 71 |
.TP |
| 72 |
\X'tty: link https://www.gnu.org/software/coreutils/mv#mv--help'\fB\-\-help\fP\X'tty: link' |
| 73 |
display this help and exit |
| 74 |
.TP |
| 75 |
\X'tty: link https://www.gnu.org/software/coreutils/mv#mv--version'\fB\-\-version\fP\X'tty: link' |
| 76 |
output version information and exit |
| 77 |
.PP |
| 78 |
UPDATE controls which existing files in the destination are replaced. |
| 79 |
\&'all' is the default operation when an \fB\-\-update\fR option is not specified, |
| 80 |
and results in all existing files in the destination being replaced. |
| 81 |
\&'none' is like the \fB\-\-no\-clobber\fR option, in that no files in the |
| 82 |
destination are replaced, and skipped files do not induce a failure. |
| 83 |
\&'none\-fail' also ensures no files are replaced in the destination, |
| 84 |
but any skipped files are diagnosed and induce a failure. |
| 85 |
\&'older' is the default operation when \fB\-\-update\fR is specified, and results |
| 86 |
in files being replaced if they're older than the corresponding source file. |
| 87 |
.PP |
| 88 |
The backup suffix is '~', unless set with \fB\-\-suffix\fR or SIMPLE_BACKUP_SUFFIX. |
| 89 |
The version control method may be selected via the \fB\-\-backup\fR option or through |
| 90 |
the VERSION_CONTROL environment variable. Here are the values: |
| 91 |
.TP |
| 92 |
none, off |
| 93 |
never make backups (even if \fB\-\-backup\fR is given) |
| 94 |
.TP |
| 95 |
numbered, t |
| 96 |
make numbered backups |
| 97 |
.TP |
| 98 |
existing, nil |
| 99 |
numbered if numbered backups exist, simple otherwise |
| 100 |
.TP |
| 101 |
simple, never |
| 102 |
always make simple backups |
| 103 |
.SH AUTHOR |
| 104 |
Written by Mike Parker, David MacKenzie, and Jim Meyering. |
| 105 |
.SH "REPORTING BUGS" |
| 106 |
Report bugs to: bug\[email protected] |
| 107 |
.br |
| 108 |
GNU coreutils home page: <https://www.gnu.org/software/coreutils/> |
| 109 |
.br |
| 110 |
General help using GNU software: <https://www.gnu.org/gethelp/> |
| 111 |
.br |
| 112 |
Report any translation bugs to <https://translationproject.org/team/> |
| 113 |
.SH "SEE ALSO" |
| 114 |
\fBrename\fP(2) |
| 115 |
.PP |
| 116 |
.br |
| 117 |
Full documentation <https://www.gnu.org/software/coreutils/mv> |
| 118 |
.br |
| 119 |
or available locally via: info \(aq(coreutils) mv invocation\(aq |
| 120 |
.PP |
| 121 |
.br |
| 122 |
Packaged by Debian (9.10\-1) |
| 123 |
.br |
| 124 |
Copyright \(co 2026 Free Software Foundation, Inc. |
| 125 |
.br |
| 126 |
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. |
| 127 |
.br |
| 128 |
This is free software: you are free to change and redistribute it. |
| 129 |
.br |
| 130 |
There is NO WARRANTY, to the extent permitted by law. |