1 | .\" $Id: syncupdate.1,v 1.1 2000-01-01 05:38:55 ghudson Exp $ |
---|
2 | .\" |
---|
3 | .\" Copyright 1999 by the Massachusetts Institute of Technology. |
---|
4 | .\" |
---|
5 | .\" Permission to use, copy, modify, and distribute this |
---|
6 | .\" software and its documentation for any purpose and without |
---|
7 | .\" fee is hereby granted, provided that the above copyright |
---|
8 | .\" notice appear in all copies and that both that copyright |
---|
9 | .\" notice and this permission notice appear in supporting |
---|
10 | .\" documentation, and that the name of M.I.T. not be used in |
---|
11 | .\" advertising or publicity pertaining to distribution of the |
---|
12 | .\" software without specific, written prior permission. |
---|
13 | .\" M.I.T. makes no representations about the suitability of |
---|
14 | .\" this software for any purpose. It is provided "as is" |
---|
15 | .\" without express or implied warranty. |
---|
16 | .\" |
---|
17 | .TH SYNCUPDATE 1 "28 December 1999" |
---|
18 | .SH NAME |
---|
19 | syncupdate \- update files with synchronously written data |
---|
20 | .SH SYNOPSIS |
---|
21 | .B syncupdate |
---|
22 | [ |
---|
23 | .B \-c |
---|
24 | .I tempfile |
---|
25 | ] |
---|
26 | .I source |
---|
27 | .I dest |
---|
28 | .fi |
---|
29 | .SH DESCRIPTION |
---|
30 | .B syncupdate |
---|
31 | copies or renames |
---|
32 | .I source |
---|
33 | to |
---|
34 | .IR dest , |
---|
35 | making sure that the information in |
---|
36 | .I source |
---|
37 | has been synchronously written out to disk before performing the final |
---|
38 | rename. |
---|
39 | .PP |
---|
40 | If the |
---|
41 | .B \-c |
---|
42 | flag is given, |
---|
43 | .B syncupdate |
---|
44 | will copy the contents of |
---|
45 | .I source |
---|
46 | to |
---|
47 | .IR tempfile , |
---|
48 | push the contents of |
---|
49 | .I tempfile |
---|
50 | to disk using |
---|
51 | .BR fsync (2), |
---|
52 | and then rename |
---|
53 | .I tempfile |
---|
54 | to |
---|
55 | .IR dest . |
---|
56 | .I tempfile |
---|
57 | will be removed prior to the copy. |
---|
58 | .B syncupdate |
---|
59 | will preserve the mode of |
---|
60 | .I source |
---|
61 | when generating |
---|
62 | .IR tempfile , |
---|
63 | but not the ownership information. |
---|
64 | .PP |
---|
65 | If the |
---|
66 | .B \-c |
---|
67 | flag is not given, |
---|
68 | .B syncupdate |
---|
69 | will open |
---|
70 | .IR source , |
---|
71 | use |
---|
72 | .BR fsync (2) |
---|
73 | to push its contents to disk, and then rename |
---|
74 | .I source |
---|
75 | to |
---|
76 | .IR dest . |
---|
77 | .SH AUTHOR |
---|
78 | Greg Hudson, MIT Information Systems |
---|
79 | .br |
---|
80 | Copyright 1999 by the Massachusetts Institute of Technology |
---|