1MV(1)                       General Commands Manual                      MV(1)
2
3
4

NAME

6       mv - move or rename files
7

SYNOPSIS

9       mv [ -i ] [ -f ] [ - ] file1 file2
10
11       mv [ -i ] [ -f ] [ - ] file ... directory
12

DESCRIPTION

14       Mv moves (changes the name of) file1 to file2.
15
16       If file2 already exists, it is removed before file1 is moved.  If file2
17       has a mode which forbids writing, mv prints the mode (see chmod(2)) and
18       reads  the  standard input to obtain a line; if the line begins with y,
19       the move takes place; if not, mv exits.
20
21       In the second form, one or more files (plain files or directories)  are
22       moved to the directory with their original file-names.
23
24       Mv refuses to move a file onto itself.
25
26       Options:
27
28       -i     stands  for interactive mode. Whenever a move is to supercede an
29              existing file, the user is prompted by the name of the file fol‐
30              lowed  by  a  question  mark. If he answers with a line starting
31              with 'y', the move continues. Any other reply prevents the  move
32              from occurring.
33
34       -f     stands for force. This option overrides any mode restrictions or
35              the -i switch.
36
37       -      means interpret all the following arguments to mv as file names.
38              This allows file names starting with minus.
39

SEE ALSO

41       cp(1), ln(1)
42

BUGS

44       If file1 and file2 lie on different file systems, mv must copy the file
45       and delete the original.  In this case the owner name becomes  that  of
46       the  copying  process  and any linking relationship with other files is
47       lost.
48
49
50
514th Berkeley Distribution       April 29, 1985                           MV(1)
Impressum