|
|
1.1 root 1: .\" Copyright (c) 1980 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)mv.1 6.1 (Berkeley) 4/29/85
6: .\"
7: .TH MV 1 "April 29, 1985"
8: .UC 4
9: .SH NAME
10: mv \- move or rename files
11: .SH SYNOPSIS
12: .B mv
13: [
14: .B \-i
15: ] [
16: .B \-f
17: ] [
18: .B \-
19: ] file1 file2
20: .PP
21: .B mv
22: [
23: .B \-i
24: ] [
25: .B \-f
26: ] [
27: .B \-
28: ] file ... directory
29: .SH DESCRIPTION
30: .I Mv
31: moves (changes the name of)
32: .I file1
33: to
34: .IR file2 .
35: .PP
36: If
37: .I file2
38: already exists, it is removed before
39: .I file1
40: is moved. If
41: .I file2
42: has a mode which forbids writing,
43: .I mv
44: prints the mode (see
45: .IR chmod (2))
46: and reads the standard input to obtain a line; if the line begins with
47: .B y,
48: the move takes place; if not,
49: .I mv
50: exits.
51: .PP
52: In the second form, one or more
53: .I files
54: (plain files or directories) are moved to the
55: .I directory
56: with their original file-names.
57: .PP
58: .I Mv
59: refuses to move a file onto itself.
60: .PP
61: Options:
62: .TP
63: .B \-i
64: stands for interactive mode. Whenever a move is to supercede an
65: existing file, the user is prompted by the name of the file
66: followed by a question mark. If he answers with a line starting
67: with 'y', the move continues. Any other reply prevents the move from
68: occurring.
69: .TP
70: .B \-f
71: stands for force. This option overrides any mode restrictions or the
72: \-i switch.
73: .TP
74: .B \-
75: means interpret all the following arguments to
76: .I mv
77: as file names. This allows file names starting with minus.
78: .SH "SEE ALSO"
79: cp(1), ln(1)
80: .SH BUGS
81: If
82: .I file1
83: and
84: .I file2
85: lie on different file systems,
86: .I mv
87: must copy the file and delete the original.
88: In this case the owner name becomes that of the copying process and any
89: linking relationship with other files is lost.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.