1CEPH-DIFF-SORTED(8) Ceph CEPH-DIFF-SORTED(8)
2
3
4
6 ceph-diff-sorted - compare two sorted files line by line
7
9 ceph-diff-sorted file1 file2
10
11
13 ceph-diff-sorted is a simplifed diff utility optimized for comparing
14 two files with lines that are lexically sorted.
15
16 The output is simplified in comparison to that of the standard diff
17 tool available in POSIX systems. Angle brackets ('<' and '>') are used
18 to show lines that appear in one file but not the other. The output is
19 not compatible with the patch tool.
20
21 This tool was created in order to perform diffs of large files (e.g.,
22 containing billions of lines) that the standard diff tool cannot handle
23 efficiently. Knowing that the lines are sorted allows this to be done
24 efficiently with minimal memory overhead.
25
26 The sorting of each file needs to be done lexcially. Most POSIX systems
27 use the LANG environment variable to determine the sort tool's sorting
28 order. To sort lexically we would need something such as:
29 $ LANG=C sort some-file.txt >some-file-sorted.txt
30
32 Compare two files:
33
34 $ ceph-diff-sorted fileA.txt fileB.txt
35
37 When complete, the exit status will be set to one of the following:
38
39 0 files same
40
41 1 files different
42
43 2 usage problem (e.g., wrong number of command-line arguments)
44
45 3 problem opening input file
46
47 4 bad file content (e.g., unsorted order or empty lines)
48
50 ceph-diff-sorted is part of Ceph, a massively scalable, open-source,
51 distributed storage system. Please refer to the Ceph documentation at
52 http://ceph.com/docs for more information.
53
55 rgw-orphan-list(8)
56
58 2010-2021, Inktank Storage, Inc. and contributors. Licensed under Cre‐
59 ative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
60
61
62
63
64dev Mar 18, 2021 CEPH-DIFF-SORTED(8)