Post History
If it is about text changes, I'd use diff files (in particular the “unified diff” format which also many version control systems use), with a caveat mentioned below. You can create the diff file by...
Answer
#1: Initial revision
If it is about text changes, I'd use diff files (in particular the “unified diff” format which also many version control systems use), with a caveat mentioned below. You can create the diff file by keeping the unedited file besides the edited file, and then use the `diff` utility, redirecting the output to another file. Note however that `diff` works line oriented; therefore it doesn't deal well with reflowing text. As an example, consider the following text in old.txt: ``` This is sample text. This exists purely for demonstration issues. In particular, for demonstration of diff. It has no other purpose. This file has 6 lines. This is the last line. ``` And the edited text in new.txt reads: ``` This is some sample text. Which has been changed. This exists purely for demonstration issues. It has no other purpose. This file has 6 lines. This is the last line. ``` Then `diff -u old.txt new.txt` gives ``` --- old.txt 2021-05-21 07:14:11.805978537 +0200 +++ new.txt 2021-05-21 07:16:07.073068543 +0200 @@ -1,6 +1,6 @@ -This is sample text. +This is some sample text. +Which has been changed. This exists purely for demonstration issues. -In particular, for demonstration of diff. It has no other purpose. This file has 6 lines. This is the last line. ``` This in my opinion makes it easy to track changes. However, it doesn't work well with reflow. Imagine you've reflowed the text before making a single change, like this: ``` This is sample text. This exists purely for demonstration issues. In particular, for demonstration of diff. It has no other purpose. This file has 3 lines. This is the last line. ``` Now the diff reads: ``` --- old.txt 2021-05-21 07:14:11.805978537 +0200 +++ new2.txt 2021-05-21 07:21:02.572795731 +0200 @@ -1,6 +1,3 @@ -This is sample text. -This exists purely for demonstration issues. -In particular, for demonstration of diff. -It has no other purpose. -This file has 6 lines. -This is the last line. +This is sample text. This exists purely for demonstration issues. In +particular, for demonstration of diff. It has no other purpose. This +file has 3 lines. This is the last line. ``` This basically is the complete original text followed by the complete reflowed text. So it's not easy to see the content change in that way. Therefore if such reflowing is common, using `diff` may not be the best way.