Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Doug Lass

macrumors regular
Original poster
Not sure where this question belongs in MacRumors, but I'll try here. I have archived a large folder onto both DVD and USB sticks. I would like to verify that each archive copy is identical to the original. So I use "diff -rq Folder1 Folder2", and when df is done, the report that comes back only says that DS_Stores in the two locations differ. I am presuming that means that the copy is exact, but the DS_Stores are different because they are just in different places. Is that correct?
 
Not sure where this question belongs in MacRumors, but I'll try here. I have archived a large folder onto both DVD and USB sticks. I would like to verify that each archive copy is identical to the original. So I use "diff -rq Folder1 Folder2", and when df is done, the report that comes back only says that DS_Stores in the two locations differ. I am presuming that means that the copy is exact, but the DS_Stores are different because they are just in different places. Is that correct?
The diff command only compare text files. The .DS_Store file is binary file. Apples and oranges. Pun intended.
 
.DS_Store just contains some customised view info for Finder, such as icon or column view, which column you've sorted by etc.
and as the copied folder is in a different location it's expected that the file might have different contents.

That file annoys me, and I usually exclude them in my backups. I sometimes run a simple terminal command which deletes them all (they get recreated each time I open a folder). I'm happy for all my directories/folders to look the same and be configured the same way in Finder.
 
  • Like
Reactions: !!!
Thanks to both of you. Do you mean diff errors on DS_Stores don't really mean anything? I was under the impression that with regard to binary files, diff would report only that the files differ, without laying out line by line differences as it would for text files. But that's what seems to be happening, that the DS_Store files differ. I was imagining that DS_Store might depend on the location of the files, which is what adrianlondon is suggesting. I think I can be relieved that these backups are validated.
 
Those files are so close to worthless in backups that I wouldn't worry, even if they weren't backed up at all.

If you run a "strings .DS_Store" command in terminal you can get a rough idea of the stuff it holds. As long as your other files are ok, you're good.
 
  • Like
Reactions: Basic75
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.