]> git.proxmox.com Git - ceph.git/blame - ceph/doc/man/8/ceph-diff-sorted.rst
import quincy beta 17.1.0
[ceph.git] / ceph / doc / man / 8 / ceph-diff-sorted.rst
CommitLineData
e306af50
TL
1:orphan:
2
3==========================================================
4 ceph-diff-sorted -- compare two sorted files line by line
5==========================================================
6
7.. program:: ceph-diff-sorted
8
9Synopsis
10========
11
12| **ceph-diff-sorted** *file1* *file2*
13
14Description
15===========
16
20effc67 17:program:`ceph-diff-sorted` is a simplified *diff* utility optimized
e306af50
TL
18for comparing two files with lines that are lexically sorted.
19
20The output is simplified in comparison to that of the standard `diff`
21tool available in POSIX systems. Angle brackets ('<' and '>') are used
22to show lines that appear in one file but not the other. The output is
23not compatible with the `patch` tool.
24
25This tool was created in order to perform diffs of large files (e.g.,
26containing billions of lines) that the standard `diff` tool cannot
27handle efficiently. Knowing that the lines are sorted allows this to
28be done efficiently with minimal memory overhead.
29
30The sorting of each file needs to be done lexcially. Most POSIX
31systems use the *LANG* environment variable to determine the `sort`
32tool's sorting order. To sort lexically we would need something such
33as:
34
35 $ LANG=C sort some-file.txt >some-file-sorted.txt
36
37Examples
38========
39
40Compare two files::
41
42 $ ceph-diff-sorted fileA.txt fileB.txt
43
44Exit Status
45===========
46
47When complete, the exit status will be set to one of the following:
48
490
50 files same
511
52 files different
532
54 usage problem (e.g., wrong number of command-line arguments)
553
56 problem opening input file
574
58 bad file content (e.g., unsorted order or empty lines)
59
60
61Availability
62============
63
64:program:`ceph-diff-sorted` is part of Ceph, a massively scalable,
65open-source, distributed storage system. Please refer to the Ceph
20effc67 66documentation at https://docs.ceph.com for more information.
e306af50
TL
67
68See also
69========
70
71:doc:`rgw-orphan-list <rgw-orphan-list>`\(8)