ref: ff6a0f490a9f7b11ec7e370dfd0a923cd0318d40
dir: /sys/man/1/derp/
.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 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. .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 option is given. This can be useful if files are not accessible due to file permission or media corruption. .PP The .B -u option will consider changes of file owner and group. When omitted, file ownership is ignored. .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 the modification time matches. This is useful when comparing /n/dump archives on the same fileserver. .PP Files are considered the same if they are from the same mount and their .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 errors were encountered. .SH HISTORY .I Derp first appeared in 9front (November, 2012).