added button GIF's to the HTML docs
[openafs.git] / doc / html / AdminReference / auarf239.htm
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4//EN">
2 <HTML><HEAD>
3 <TITLE>Administration Reference</TITLE>
4 <!-- Begin Header Records  ========================================== -->
5 <!-- /tmp/idwt3672/auarf000.scr converted by idb2h R4.2 (359) ID      -->
6 <!-- Workbench Version (AIX) on 3 Oct 2000 at 16:18:30                -->
7 <META HTTP-EQUIV="updated" CONTENT="Tue, 03 Oct 2000 16:18:29">
8 <META HTTP-EQUIV="review" CONTENT="Wed, 03 Oct 2001 16:18:29">
9 <META HTTP-EQUIV="expires" CONTENT="Thu, 03 Oct 2002 16:18:29">
10 </HEAD><BODY>
11 <!-- (C) IBM Corporation 2000. All Rights Reserved    --> 
12 <BODY bgcolor="ffffff"> 
13 <!-- End Header Records  ============================================ -->
14 <A NAME="Top_Of_Page"></A>
15 <H1>Administration Reference</H1>
16 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf238.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Bot_Of_Page"><IMG SRC="../bot.gif" BORDER="0" ALT="[Bottom of Topic]"></A> <A HREF="auarf240.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
17 <P>
18 <H2><A NAME="HDRUP" HREF="auarf002.htm#ToC_253">up</A></H2>
19 <A NAME="IDX5493"></A>
20 <A NAME="IDX5494"></A>
21 <A NAME="IDX5495"></A>
22 <P><STRONG>Purpose</STRONG>
23 <P>Recursively copies the contents of a source directory to a destination
24 directory.
25 <P><STRONG>Synopsis</STRONG>
26 <PRE><B>up</B> [<B>-v</B>]  [<B>-1</B>]  [<B>-f</B>]  [<B>-r</B>]  [<B>-x</B>]  &lt;<VAR>source&nbsp;directory</VAR>>  &lt;<VAR>destination&nbsp;directory</VAR>>
27 </PRE>
28 <P>This command does not use the syntax conventions of the AFS command
29 suites. Provide the command name and all option names in full.
30 <P><STRONG>Description</STRONG>
31 <P>The <B>up</B> command recursively copies the files and subdirectories
32 in a specified source directory to a specified destination directory.
33 The command interpreter changes the destination directory and the files and
34 subdirectories in it in the following ways:
35 <UL>
36 <P><LI>It copies the source directory's access control list (ACL) to the
37 destination directory and its subdirectories, overwriting any existing
38 ACLs.
39 <P><LI>If the issuer is logged on as the local superuser <B>root</B> and has
40 AFS tokens as a member of the group <B>system:administrators</B>,
41 then the source directory's owner (as reported by the <B>ls -ld</B>
42 command) becomes the owner of the destination directory and all files and
43 subdirectories in it. Otherwise, the issuer's user name is
44 recorded as the owner.
45 <P><LI>If a file or directory exists in both the source and destination
46 directories, the source version overwrites the destination version. The
47 overwrite operation fails if the first (user) <B>w</B> (<B>write</B>)
48 mode bit is turned off on the version in the destination directory, unless the
49 <B>-f</B> flag is provided.
50 <P><LI>The modification timestamp on a file (as displayed by the <B>ls -l</B>
51 command) in the source directory overwrites the timestamp on a file of the
52 same name in the destination directory, but the timestamp on an existing
53 subdirectory in the destination directory remains unchanged. If the
54 command creates a new subdirectory in the destination directory, the new
55 subdirectory's timestamp is set to the time of the copy operation, rather
56 than to the timestamp that the subdirectory has in the source
57 directory.
58 </UL>
59 <P>The <B>up</B> command is idempotent, meaning that if its execution is
60 interrupted by a network, server machine, or process outage, then a subsequent
61 reissue of the same command continues from the interruption point, rather than
62 starting over at the beginning. This saves time and reduces network
63 traffic in comparison to the UNIX commands that provide similar
64 functionality.
65 <P>The <B>up</B> command returns a status code of <B>0</B> (zero) only
66 if it succeeds. Otherwise, it returns a status code of <B>1</B>
67 (one).
68 <P><STRONG>Options</STRONG>
69 <DL>
70 <P><DT><B>-v
71 </B><DD>Prints a detailed trace to the standard output stream as the command
72 runs.
73 <P><DT><B>-1
74 </B><DD>Copies only the files in the top level source directory to the destination
75 directory, rather than copying recursively through subdirectories. The
76 source directory's ACL still overwrites the destination
77 directory's. (This is the number one, not the letter
78 <B>l</B>.)
79 <P><DT><B>-f
80 </B><DD>Overwrites existing directories, subdirectories, and files even if the
81 first (user) <B>w</B> (<B>write</B>) mode bit is turned off on the
82 version in the destination directory.
83 <P><DT><B>-r
84 </B><DD>Creates a backup copy of all files overwritten in the destination
85 directory and its subdirectories, by adding a <B>.old</B> extension
86 to each filename.
87 <P><DT><B>-x
88 </B><DD>Sets the modification timestamp on each file to the time of the copying
89 operation.
90 <P><DT><B><VAR>source directory</VAR>
91 </B><DD>Names the directory to copy recursively.
92 <P><DT><B><VAR>destination directory</VAR>
93 </B><DD>Names the directory to which to copy. It does not have to exist
94 already.
95 </DL>
96 <P><STRONG>Examples</STRONG>
97 <P>The following command copies the contents of the directory <VAR>dir1</VAR> to
98 directory <VAR>dir2</VAR>:
99 <PRE>   % <B>up dir1 dir2</B>
100    
101 </PRE>
102 <P><STRONG>Privilege Required</STRONG>
103 <P>The issuer must have the <B>a</B> (<B>administer</B>) permission on
104 the ACL of both the source and destination directories.
105 <P>
106 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf238.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Top_Of_Page"><IMG SRC="../top.gif" BORDER="0" ALT="[Top of Topic]"></A> <A HREF="auarf240.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
107 <!-- Begin Footer Records  ========================================== -->
108 <P><HR><B> 
109 <br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A>  All Rights Reserved 
110 </B> 
111 <!-- End Footer Records  ============================================ -->
112 <A NAME="Bot_Of_Page"></A>
113 </BODY></HTML>