That's a great question, but the term "resolve" might not be the most appropriate here. The 'Only in' message isn't an error that needs fixing; it's simply informing you about the differences between two directories.
The diff -r command isn't designed to "resolve" these differences automatically in the sense of making the directories identical. Its purpose is to report what the differences are.
If you want to make the directories identical, you would need to take manual action based on the diff output, such as:
- Copying files: If you want files that are 'Only in' one directory to also be in the other, you'd use the
cpcommand. - Deleting files: If you want to remove files that are 'Only in' a directory to match the other, you'd use the
rmcommand.
The current step is focused on understanding how diff -r works, not on synchronizing directories.
Does that clarify why you see the 'Only in' messages?