3 ==========================================================
4 ceph-diff-sorted -- compare two sorted files line by line
5 ==========================================================
7 .. program:: ceph-diff-sorted
12 | **ceph-diff-sorted** *file1* *file2*
17 :program:`ceph-diff-sorted` is a simplifed *diff* utility optimized
18 for comparing two files with lines that are lexically sorted.
20 The output is simplified in comparison to that of the standard `diff`
21 tool available in POSIX systems. Angle brackets ('<' and '>') are used
22 to show lines that appear in one file but not the other. The output is
23 not compatible with the `patch` tool.
25 This tool was created in order to perform diffs of large files (e.g.,
26 containing billions of lines) that the standard `diff` tool cannot
27 handle efficiently. Knowing that the lines are sorted allows this to
28 be done efficiently with minimal memory overhead.
30 The sorting of each file needs to be done lexcially. Most POSIX
31 systems use the *LANG* environment variable to determine the `sort`
32 tool's sorting order. To sort lexically we would need something such
35 $ LANG=C sort some-file.txt >some-file-sorted.txt
42 $ ceph-diff-sorted fileA.txt fileB.txt
47 When complete, the exit status will be set to one of the following:
54 usage problem (e.g., wrong number of command-line arguments)
56 problem opening input file
58 bad file content (e.g., unsorted order or empty lines)
64 :program:`ceph-diff-sorted` is part of Ceph, a massively scalable,
65 open-source, distributed storage system. Please refer to the Ceph
66 documentation at http://ceph.com/docs for more information.
71 :doc:`rgw-orphan-list <rgw-orphan-list>`\(8)