Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / doc / man-pages / pod1 / up.pod
CommitLineData
805e021f
CE
1=head1 NAME
2
3up - Recursively copy directories, preserving AFS metadata
4
5=head1 SYNOPSIS
6
7=for html
8<div class="synopsis">
9
10B<up> [B<-v>] [B<-1>] [B<-f>] [B<-r>] [B<-x>] [B<-m>]
11 <I<source directory>> <I<destination directory>>
12
13=for html
14</div>
15
16=head1 DESCRIPTION
17
18The B<up> command recursively copies the files and subdirectories in a
19specified source directory to a specified destination directory. The
20command interpreter changes the destination directory and the files and
21subdirectories in it in the following ways:
22
23=over 4
24
25=item *
26
27It copies the source directory's access control list (ACL) to the
28destination directory and its subdirectories, overwriting any existing
29ACLs.
30
31=item *
32
33If the issuer is logged on as the local superuser root and has AFS tokens
34as a member of the group system:administrators, then the source
35directory's owner (as reported by the C<ls -ld> command) becomes the owner
36of the destination directory and all files and subdirectories in
37it. Otherwise, the issuer's user name is recorded as the owner.
38
39=item *
40
41If a file or directory exists in both the source and destination
42directories, the source version overwrites the destination version. The
43overwrite operation fails if the first (user) C<w> (write) mode bit is
44turned off on the version in the destination directory, unless the B<-f>
45flag is provided.
46
47=item *
48
49The modification timestamp on a file (as displayed by the C<ls -l>
50command) in the source directory overwrites the timestamp on a file of the
51same name in the destination directory, but the timestamp on an existing
52subdirectory in the destination directory remains unchanged. If the
53command creates a new subdirectory in the destination directory, the new
54subdirectory's timestamp is set to the time of the copy operation, rather
55than to the timestamp that the subdirectory has in the source directory.
56
57=back
58
59The up command is idempotent, meaning that if its execution is interrupted
60by a network, server machine, or process outage, then a subsequent reissue
61of the same command continues from the interruption point, rather than
62starting over at the beginning. This saves time and reduces network
63traffic in comparison to the UNIX commands that provide similar
64functionality.
65
66The B<up> command returns a status code of C<0> (zero) only if it
67succeeds. Otherwise, it returns a status code of C<1> (one).
68
69This command does not use the syntax conventions of the AFS command
70suites. Provide the command name and all option names in full.
71
72=head1 OPTIONS
73
74=over 4
75
76=item B<-v>
77
78Prints a detailed trace to the standard output stream as the command runs.
79
80=item B<-1>
81
82Copies only the files in the top level source directory to the destination
83directory, rather than copying recursively through subdirectories. The
84source directory's ACL still overwrites the destination directory's. (This
85is the number one, not the letter C<l>.)
86
87=item B<-f>
88
89Overwrites existing directories, subdirectories, and files even if the
90first (user) C<w> (write) mode bit is turned off on the version in the
91destination directory.
92
93=item B<-m>
94
95Recognize and copy mount points rather than traversing the volumes they
96reference during the recursive copy operation. Without B<-m>, B<up>'s
97default behavior is to copy the contents of all volumes and subvolumes
98mounted under the source directory into the volume containing the
99destination directory.
100
101=item B<-r>
102
103Creates a backup copy of all files overwritten in the destination
104directory and its subdirectories, by adding a C<.old> extension to each
105filename.
106
107=item B<-x>
108
109Sets the modification timestamp on each file to the time of the copying
110operation.
111
112=item I<source directory>
113
114Names the directory to copy recursively.
115
116=item I<destination directory>
117
118Names the directory to which to copy. It does not have to exist already.
119
120=back
121
122=head1 EXAMPLES
123
124The following command copies the contents of the directory F<dir1> to
125directory F<dir2>:
126
127 % up dir1 dir2
128
129=head1 PRIVILEGE REQUIRED
130
131The issuer must have the C<a> (administer) permission on the ACL of both
132the source and destination directories.
133
134=head1 COPYRIGHT
135
136IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
137
138This documentation is covered by the IBM Public License Version 1.0. It was
139converted from HTML to POD by software written by Chas Williams and Russ
140Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.