.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "CEPH-DIFF-SORTED" "8" "Oct 24, 2023" "dev" "Ceph" .SH NAME ceph-diff-sorted \- compare two sorted files line by line .SH SYNOPSIS .nf \fBceph\-diff\-sorted\fP \fIfile1\fP \fIfile2\fP .fi .sp .SH DESCRIPTION .sp \fBceph\-diff\-sorted\fP is a simplified \fIdiff\fP utility optimized for comparing two files with lines that are lexically sorted. .sp The output is simplified in comparison to that of the standard \fIdiff\fP tool available in POSIX systems. Angle brackets (\(aq<\(aq and \(aq>\(aq) are used to show lines that appear in one file but not the other. The output is not compatible with the \fIpatch\fP tool. .sp This tool was created in order to perform diffs of large files (e.g., containing billions of lines) that the standard \fIdiff\fP tool cannot handle efficiently. Knowing that the lines are sorted allows this to be done efficiently with minimal memory overhead. .sp The sorting of each file needs to be done lexically. Most POSIX systems use the \fILANG\fP environment variable to determine the \fIsort\fP tool\(aqs sorting order. To sort lexically we would need something such as: .INDENT 0.0 .INDENT 3.5 $ LANG=C sort some\-file.txt >some\-file\-sorted.txt .UNINDENT .UNINDENT .SH EXAMPLES .sp Compare two files: .INDENT 0.0 .INDENT 3.5 .sp .EX $ ceph\-diff\-sorted fileA.txt fileB.txt .EE .UNINDENT .UNINDENT .SH EXIT STATUS .sp When complete, the exit status will be set to one of the following: .INDENT 0.0 .TP .B 0 files same .TP .B 1 files different .TP .B 2 usage problem (e.g., wrong number of command\-line arguments) .TP .B 3 problem opening input file .TP .B 4 bad file content (e.g., unsorted order or empty lines) .UNINDENT .SH AVAILABILITY .sp \fBceph\-diff\-sorted\fP is part of Ceph, a massively scalable, open\-source, distributed storage system. Please refer to the Ceph documentation at \fI\%https://docs.ceph.com\fP for more information. .SH SEE ALSO .sp \fI\%rgw\-orphan\-list\fP(8) .SH COPYRIGHT 2010-2023, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0) .\" Generated by docutils manpage writer. .