Answers
Comparing directories
Q I have two folders that are backups from different months of the same Linux: LinuxA and LinuxB. I want to know what was modified in LinuxB compared to LinuxA. I have heard about the diff command, but reading the diff manual doesn’t seem right: “GNU diff – compare files line by line”
The comparison I believe I need is to compare the files by date modified and if different, that file has certainly changed. Do you have any idea how I can do this?
Nick
A Modification dates do not provide a reliable guide as to whether a file has changed. Consider a program that loads it settings when it starts and saves them on exit. The configuration file’s timestamp will change but the contents will be the same if you haven’t made any changes. Your suggestion of diff considers the contents, but as you say it is for text files, and also it outputs a list of the differences, whereas you only want to know what has changed.
One program that can be used to find such files, checking their contents, is . This program is designed specifically to do what you need – find duplicate files. It first checks file size and then, for files of the same size, it compares checksums of the files’ contents. It doesn’t take
You’re reading a preview, subscribe to read more.
Start your free 30 days