Command line to compare two external drives?

Discussion in 'Mac Basics and Help' started by yalag, Apr 20, 2017.

  1. yalag macrumors 65816

    Joined:
    Nov 18, 2007
    #1
    I'm about to clone one external drive to another using Disk Utility. I want to make sure that it is a perfect copy. What is the command line after the clone to make sure that every single file and folder is exactly the same including file dates and such?
     
  2. Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #3
    You can use rsync to do this. The options vary depending on what you want to check. If you just want to verify that the files are there with the right dates et al, you could use this:

    rsync -nav /Volumes/disk1/ /Volumes/disk2

    It will print out a list of things on disk 1 that do not match disk 2.

    n.b.: the trailing slash on the first volume is important, do not leave it out.

    If you want to read all the files and checksum their contents, add the -c switch. This will take a long time.

    A.
     

Share This Page