November 30 2023, 16:37

Published an article on hybrismart about my utility for comparing file system snapshots. It’s amusing that this is actually the second iteration—the first was made under DOS, to share a library of warez according to friends’ choices. Of course, the utility now has broader applications possible 🙂

Briefly, it works like this. Vasya does a dir /S on his Windows machine or ls -lR on his Mac and sends the file to Petya. Petya opens it in my program, selects a hundred files from different directories, and creates a request file, which is essentially a script or a flat list of files, and sends it back to Vasya. Vasya receives this script, executes it on his machine, retrieves an archive with only the selected files, and passes this archive to Petya. Petya unpacks the archive, and all the files are placed into the corresponding spots in his file system, preserving all directories.

The second case is when both Vasya’s and Petya’s machines contain the same huge archive of something, which is supposed to be identical, but things happen, and something gets corrupted or deleted that wasn’t supposed to be, or, conversely, some extraneous files are created that alter the system’s behavior on Petya’s end differently from Vasya’s, even though you would think the source code, which is under version control, is the same. How to figure this out? That’s where the utility comes in. Each takes snapshots of the directory with all subdirectories, and then the utility compares them and shows the difference. Comparing them in other ways is very tricky, especially if Vasya and Petya are on different operating systems, or on the same operating system but in different languages, or on the same OS but different versions or modifications.

The source code is included. Requires Python/QT.

Leave a comment