|
NAME | SYNOPSIS | DESCRIPTION | AUTHOR | REPORTING BUGS | COPYRIGHT | SEE ALSO | COLOPHON |
|
|
|
MV(1) User Commands MV(1)
mv - move (rename) files
mv [OPTION]... [-T] SOURCE DEST
mv [OPTION]... SOURCE... DIRECTORY
mv [OPTION]... -t DIRECTORY SOURCE...
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
Mandatory arguments to long options are mandatory for short
options too.
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv--backup\--backup[=CONTROL]]8;;\
make a backup of each existing destination file
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-b\-b]8;;\ like --backup but does not accept an argument
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv--debug\--debug]8;;\
explain how a file is copied. Implies -v
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv--exchange\--exchange]8;;\
exchange source and destination
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-f\-f, --force]8;;\
do not prompt before overwriting
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-i\-i, --interactive]8;;\
prompt before overwrite
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-n\-n, --no-clobber]8;;\
do not overwrite an existing file
If you specify more than one of -i, -f, -n, only the final one
takes effect.
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv--no-copy\--no-copy]8;;\
do not copy if renaming fails
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv--strip-trailing-slashes\--strip-trailing-slashes]8;;\
remove any trailing slashes from each SOURCE argument
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-S\-S, --suffix=SUFFIX]8;;\
override the usual backup suffix
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-t\-t, --target-directory=DIRECTORY]8;;\
move all SOURCE arguments into DIRECTORY
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-T\-T, --no-target-directory]8;;\
treat DEST as a normal file
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv--update\--update[=UPDATE]]8;;\
control which existing files are updated;
UPDATE={all,none,none-fail,older(default)}
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-u\-u]8;;\ equivalent to --update[=older]. See below
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-v\-v, --verbose]8;;\
explain what is being done
]8;;https://www.gnu.org/software/coreutils/manual/coreutils.html#mv-Z\-Z, --context]8;;\
set SELinux security context of destination file to default
type
]8;;https://www.gnu.org/software/coreutils/mv#mv--help\--help]8;;\ display this help and exit
]8;;https://www.gnu.org/software/coreutils/mv#mv--version\--version]8;;\
output version information and exit
UPDATE controls which existing files in the destination are
replaced. 'all' is the default operation when an --update option
is not specified, and results in all existing files in the
destination being replaced. 'none' is like the --no-clobber
option, in that no files in the destination are replaced, and
skipped files do not induce a failure. 'none-fail' also ensures
no files are replaced in the destination, but any skipped files
are diagnosed and induce a failure. 'older' is the default
operation when --update is specified, and results in files being
replaced if they're older than the corresponding source file.
The backup suffix is '~', unless set with --suffix or
SIMPLE_BACKUP_SUFFIX. The version control method may be selected
via the --backup option or through the VERSION_CONTROL environment
variable. Here are the values:
none, off
never make backups (even if --backup is given)
numbered, t
make numbered backups
existing, nil
numbered if numbered backups exist, simple otherwise
simple, never
always make simple backups
Written by Mike Parker, David MacKenzie, and Jim Meyering.
Report bugs to: bug-coreutils@gnu.org
GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
General help using GNU software: <https://www.gnu.org/gethelp/>
Report any translation bugs to
<https://translationproject.org/team/>
Copyright © 2026 Free Software Foundation, Inc. License GPLv3+:
GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
rename(2)
Full documentation <https://www.gnu.org/software/coreutils/mv>
or available locally via: info '(coreutils) mv invocation'
This page is part of the coreutils (basic file, shell and text
manipulation utilities) project. Information about the project
can be found at ⟨http://www.gnu.org/software/coreutils/⟩. If you
have a bug report for this manual page, see
⟨http://www.gnu.org/software/coreutils/⟩. This page was obtained
from the tarball coreutils-9.11.tar.xz fetched from
⟨http://ftp.gnu.org/gnu/coreutils/⟩ on 2026-05-24. If you
discover any rendering problems in this HTML version of the page,
or you believe there is a better or more up-to-date source for the
page, or you have corrections or improvements to the information
in this COLOPHON (which is not part of the original manual page),
send a mail to man-pages@man7.org
GNU coreutils 9.11 April 2026 MV(1)
Pages that refer to this page: rename(1), sshfs(1), rename(2), inotify(7), symlink(7), lsof(8)