]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/derp
add directory-examining recursive compare derp(1)
[plan9front.git] / sys / man / 1 / derp
1 .TH DERP 1
2 .SH NAME
3 derp \- directory-examining recursive compare
4 .SH SYNOPSIS
5 .B derp
6 [
7 .B -qcutDL
8 ] [
9 .B -p
10 .I perms
11
12 .I myfile
13 .I oldfile
14 .I yourfile
15 .SH DESCRIPTION
16 .I Derp
17 recursively compares the two directories
18 .I myfile
19 and
20 .I yourfile
21 using a third common backup directory
22 .I oldfile
23 as reference. The changes found are printed
24 to standard output, one per line, with the file
25 status describing either side followed by tabulator
26 and the relative file path.
27 .LP
28 The possible status codes:
29 .TP
30 .B an
31 File added in
32 .I myfile
33 .TP
34 .B na
35 File added in
36 .I yourfile
37 .TP
38 .B aa!
39 Both sides added different files with the
40 same name
41 .TP
42 .B mn
43 File was modified in
44 .I myfile
45 .TP
46 .B nm
47 File was modified in
48 .I yourfile
49 .TP
50 .B mm!
51 File was changed differently in
52 .I myfile
53 and
54 .I yourfile
55 .TP
56 .B dn
57 File was deleted in
58 .I myfile
59 .TP
60 .B nd
61 File was deleted in
62 .I yourfile
63 .TP
64 .B md!
65 File was modified in
66 .I myfile
67 but deleted in
68 .I yourfile
69 .TP
70 .B dm!
71 File was modified in
72 .I yourfile
73 but deleted in
74 .I myfile
75 .LP
76 Errors are printed to standard error unless
77 .B -q
78 option is specified. The program is terminated
79 when errors are encountered unless the
80 .B -c
81 option is given. This can be usefull if files
82 are not accessible due to file permission or
83 media corruption.
84 .PP
85 The
86 .B -u
87 option will consider changes of file owner and group.
88 When omited, file ownership is ignored.
89 .PP
90 The
91 .B -p
92 option sets the octal mask
93 .I perms
94 of bits to check in the file permissions. The default
95 ignores file permissions.
96 .PP
97 When modification times are comparable then the
98 .B -t
99 option can be used to quickly find changes. If specified,
100 files are considered unchanged if the name, file size and
101 the modification time matches. This is usefull when
102 comparing /n/dump archives on the same fileserver.
103 .PP
104 Files are considered the same if they are from the
105 same mount and ther
106 .B qid
107 (see
108 .IR stat (5))
109 matches. For directories, the access time is also
110 compared. If the access time was disabled on the
111 fileserver, then all directories need to be compared
112 using the
113 .B -D
114 option.
115 .PP
116 Some filesystems like
117 .IR hgfs (4)
118 do not always return exact file size in stat, so
119 the length check can be disabled with the
120 .B -L
121 option.
122 .SH SOURCE
123 .B /sys/src/cmd/derp.c
124 .SH "SEE ALSO"
125 .IR cmp (1),
126 .IR diff (1),
127 .IR history (1),
128 .IR fs (4),
129 .IR hgfs (4)
130 .SH DIAGNOSTICS
131 The exit status is set to 'errors' when
132 errors where encountered.