Bell 32V development
[unix-history] / usr / man / man1 / mv.1
CommitLineData
c1030a02
TL
1.TH MV 1
2.SH NAME
3mv \- move or rename files
4.SH SYNOPSIS
5.B mv
6file1 file2
7.PP
8.B mv
9file ... directory
10.SH DESCRIPTION
11.I Mv
12moves (changes the name of)
13.I file1
14to
15.IR file2 .
16.PP
17If
18.I file2
19already exists,
20it is removed before
21.I file1
22is moved.
23If
24.I file2
25has a mode which forbids writing,
26.I mv
27prints the mode (see
28.IR chmod (2))
29and
30reads the standard input to obtain a line;
31if the line begins with
32.B y,
33the move takes place;
34if not,
35.I mv
36exits.
37.PP
38In the second form,
39one or more
40.I files
41are moved to the
42.I directory
43with their original
44file-names.
45.PP
46.I Mv
47refuses to move a file onto itself.
48.SH "SEE ALSO"
49cp(1), chmod(2)
50.SH BUGS
51If
52.I file1
53and
54.I file2
55lie on different file systems,
56.I mv
57must copy the file and delete the original.
58In this case the owner name becomes
59that of the copying process and any
60linking relationship with other files
61is lost.
62.PP
63Directories may only be moved within the same parent
64directory.
65.PP
66.I Mv
67should take
68.B \-f
69flag, like
70.I rm,
71to suppress the question
72if the target exists and is not writable.