You can compare the contents of a document with the diff command.
[Syntax]: diff [parameter] file 1 file 2
[Note]: This command compares two text files, will be different columns out
-B Converts a string of spaces or tabs into a space or tab
-e generates an edit angle book that converts the file 1 to a file 2 as an ex or ED input
[Example]:
diff File1 File2
Diff-b file1 file2
DIFF-E file1 file2 >edscript
Common parameters of the diff command
A use all files as text files for processing
b Ignore the differences caused by whitespace
B ignore the differences caused by empty rows
Q Only reports what is different and does not report specific different information
H use heuristics to accelerate search of large files
I ignore case changes
L page out the output with PR
R compares all subdirectories when comparing directories
s two files are reported the same
V Output version information on standard output and exit
Ll-r > Dir1.list
Ll-r > Dir2.list
Extract two lists and compare them with diff
How do two documents in Linux compare to the same content?