1MV(1)                            User Commands                           MV(1)
2
3
4

NAME

6       mv - move (rename) files
7

SYNOPSIS

9       mv [OPTION]... [-T] SOURCE DEST
10       mv [OPTION]... SOURCE... DIRECTORY
11       mv [OPTION]... -t DIRECTORY SOURCE...
12

DESCRIPTION

14       Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
15
16       Mandatory  arguments  to  long  options are mandatory for short options
17       too.
18
19       --backup[=CONTROL]
20              make a backup of each existing destination file
21
22       -b     like --backup but does not accept an argument
23
24       --debug
25              explain how a file is copied.  Implies -v
26
27       -f, --force
28              do not prompt before overwriting
29
30       -i, --interactive
31              prompt before overwrite
32
33       -n, --no-clobber
34              do not overwrite an existing file
35
36       If you specify more than one of -i, -f, -n, only the  final  one  takes
37       effect.
38
39       --no-copy
40              do not copy if renaming fails
41
42       --strip-trailing-slashes
43              remove any trailing slashes from each SOURCE argument
44
45       -S, --suffix=SUFFIX
46              override the usual backup suffix
47
48       -t, --target-directory=DIRECTORY
49              move all SOURCE arguments into DIRECTORY
50
51       -T, --no-target-directory
52              treat DEST as a normal file
53
54       --update[=UPDATE]
55              control     which    existing    files    are    updated;    UP‐
56              DATE={all,none,older(default)}.  See below
57
58       -u     equivalent to --update[=older]
59
60       -v, --verbose
61              explain what is being done
62
63       -Z, --context
64              set SELinux security context of destination file to default type
65
66       --help display this help and exit
67
68       --version
69              output version information and exit
70
71       UPDATE controls which existing files in the destination  are  replaced.
72       'all'  is  the  default operation when an --update option is not speci‐
73       fied, and results in all existing files in the  destination  being  re‐
74       placed.  'none' is similar to the --no-clobber option, in that no files
75       in the destination are replaced, but also skipped files do not induce a
76       failure.   'older' is the default operation when --update is specified,
77       and results in files being replaced if they're older  than  the  corre‐
78       sponding source file.
79
80       The   backup   suffix   is  '~',  unless  set  with  --suffix  or  SIM‐
81       PLE_BACKUP_SUFFIX.  The version control method may be selected via  the
82       --backup  option  or  through the VERSION_CONTROL environment variable.
83       Here are the values:
84
85       none, off
86              never make backups (even if --backup is given)
87
88       numbered, t
89              make numbered backups
90
91       existing, nil
92              numbered if numbered backups exist, simple otherwise
93
94       simple, never
95              always make simple backups
96

AUTHOR

98       Written by Mike Parker, David MacKenzie, and Jim Meyering.
99

REPORTING BUGS

101       GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
102       Report any translation bugs to <https://translationproject.org/team/>
103
105       Copyright © 2023 Free Software Foundation, Inc.   License  GPLv3+:  GNU
106       GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
107       This  is  free  software:  you  are free to change and redistribute it.
108       There is NO WARRANTY, to the extent permitted by law.
109

SEE ALSO

111       rename(2)
112
113       Full documentation <https://www.gnu.org/software/coreutils/mv>
114       or available locally via: info '(coreutils) mv invocation'
115
116
117
118GNU coreutils 9.3               September 2023                           MV(1)
Impressum