----- Original Message ----- From: mitch@netline.com To: toasters@mathworks.com Sent: Friday, March 15, 2002 12:30 PM Subject: Using diff on snapshots
Greetings!
I've run across an issue that I'm surprised I've never run across before. I needed to find the differences between a file and it's counterpart in the snapshot area. When I ran a diff, it reported no differences. That was quite the shock since I knew for a fact the file had changed, albeit ever so slightly. I used cmp(1) on it, and it quickly noted that the files were different.
As someone else pointed out, most if not all diffs "cheat" by assuming if two files in the same filesystem have the same inode number, they point to the same data. This is normally a correct assumption. The way the .snapshot directory works within a filesystem creates such a situation.
Short of changing the source, the best way to work around this issue is not to access .snapshot via the regular filesystem, but to mount the filers .snapshot directory itself as a seperate mount point. This will force diff not to make the assumption (since it thinks it is a different filesystem).
Bruce