2012-11-02 19:28:12 +00:00
|
|
|
.TH DERP 1
|
|
|
|
.SH NAME
|
|
|
|
derp \- directory-examining recursive compare
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B derp
|
|
|
|
[
|
|
|
|
.B -qcutDL
|
|
|
|
] [
|
|
|
|
.B -p
|
|
|
|
.I perms
|
|
|
|
]
|
|
|
|
.I myfile
|
|
|
|
.I oldfile
|
|
|
|
.I yourfile
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.I Derp
|
|
|
|
recursively compares the two directories
|
|
|
|
.I myfile
|
|
|
|
and
|
|
|
|
.I yourfile
|
|
|
|
using a third common backup directory
|
|
|
|
.I oldfile
|
|
|
|
as reference. The changes found are printed
|
|
|
|
to standard output, one per line, with the file
|
2012-11-21 14:34:12 +00:00
|
|
|
status describing either sides actions followed
|
|
|
|
by tabulator and the relative file path which might
|
|
|
|
be empty in case when the changed files refers to the
|
|
|
|
ones given at program arguments.
|
2012-11-02 19:28:12 +00:00
|
|
|
.LP
|
|
|
|
The possible status codes:
|
|
|
|
.TP
|
|
|
|
.B an
|
|
|
|
File added in
|
|
|
|
.I myfile
|
|
|
|
.TP
|
|
|
|
.B na
|
|
|
|
File added in
|
|
|
|
.I yourfile
|
|
|
|
.TP
|
|
|
|
.B aa!
|
|
|
|
Both sides added different files with the
|
|
|
|
same name
|
|
|
|
.TP
|
|
|
|
.B mn
|
|
|
|
File was modified in
|
|
|
|
.I myfile
|
|
|
|
.TP
|
|
|
|
.B nm
|
|
|
|
File was modified in
|
|
|
|
.I yourfile
|
|
|
|
.TP
|
|
|
|
.B mm!
|
|
|
|
File was changed differently in
|
|
|
|
.I myfile
|
|
|
|
and
|
|
|
|
.I yourfile
|
|
|
|
.TP
|
|
|
|
.B dn
|
|
|
|
File was deleted in
|
|
|
|
.I myfile
|
|
|
|
.TP
|
|
|
|
.B nd
|
|
|
|
File was deleted in
|
|
|
|
.I yourfile
|
|
|
|
.TP
|
|
|
|
.B md!
|
|
|
|
File was modified in
|
|
|
|
.I myfile
|
|
|
|
but deleted in
|
|
|
|
.I yourfile
|
|
|
|
.TP
|
|
|
|
.B dm!
|
|
|
|
File was modified in
|
|
|
|
.I yourfile
|
|
|
|
but deleted in
|
|
|
|
.I myfile
|
|
|
|
.LP
|
|
|
|
Errors are printed to standard error unless
|
|
|
|
.B -q
|
|
|
|
option is specified. The program is terminated
|
|
|
|
when errors are encountered unless the
|
|
|
|
.B -c
|
2012-11-02 21:15:17 +00:00
|
|
|
option is given. This can be useful if files
|
2012-11-02 19:28:12 +00:00
|
|
|
are not accessible due to file permission or
|
|
|
|
media corruption.
|
|
|
|
.PP
|
|
|
|
The
|
|
|
|
.B -u
|
|
|
|
option will consider changes of file owner and group.
|
2012-11-02 21:15:17 +00:00
|
|
|
When omitted, file ownership is ignored.
|
2012-11-02 19:28:12 +00:00
|
|
|
.PP
|
|
|
|
The
|
|
|
|
.B -p
|
|
|
|
option sets the octal mask
|
|
|
|
.I perms
|
|
|
|
of bits to check in the file permissions. The default
|
|
|
|
ignores file permissions.
|
|
|
|
.PP
|
|
|
|
When modification times are comparable then the
|
|
|
|
.B -t
|
|
|
|
option can be used to quickly find changes. If specified,
|
|
|
|
files are considered unchanged if the name, file size and
|
2012-11-02 21:15:17 +00:00
|
|
|
the modification time matches. This is useful when
|
2012-11-02 19:28:12 +00:00
|
|
|
comparing /n/dump archives on the same fileserver.
|
|
|
|
.PP
|
|
|
|
Files are considered the same if they are from the
|
2012-11-02 21:15:17 +00:00
|
|
|
same mount and their
|
2012-11-02 19:28:12 +00:00
|
|
|
.B qid
|
|
|
|
(see
|
|
|
|
.IR stat (5))
|
|
|
|
matches. For directories, the access time is also
|
|
|
|
compared. If the access time was disabled on the
|
|
|
|
fileserver, then all directories need to be compared
|
|
|
|
using the
|
|
|
|
.B -D
|
|
|
|
option.
|
|
|
|
.PP
|
|
|
|
Some filesystems like
|
|
|
|
.IR hgfs (4)
|
|
|
|
do not always return exact file size in stat, so
|
|
|
|
the length check can be disabled with the
|
|
|
|
.B -L
|
|
|
|
option.
|
|
|
|
.SH SOURCE
|
|
|
|
.B /sys/src/cmd/derp.c
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
.IR cmp (1),
|
|
|
|
.IR diff (1),
|
|
|
|
.IR history (1),
|
|
|
|
.IR fs (4),
|
|
|
|
.IR hgfs (4)
|
|
|
|
.SH DIAGNOSTICS
|
|
|
|
The exit status is set to 'errors' when
|
2012-11-02 21:15:17 +00:00
|
|
|
errors were encountered.
|
2013-12-27 21:22:05 +00:00
|
|
|
.SH HISTORY
|
|
|
|
.I Derp
|
|
|
|
first appeared in 9front (November, 2012).
|