Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On Linux I've done a rsync syncing supposedly everything in /home to /backup. Both of these disk are the same size, but after the sync du -h shows around 50G difference. I want to know what the 50G difference is. What's the best way to check it?

share|improve this question
    
Not an answer to your question but a possible reason: If /backup wasn't empty and you didn't use rsync's --delete option then /backup should be larger than /home. –  Mike Fitzpatrick Mar 31 '11 at 5:46
    
Hi I did have the --delete option on. –  huggie Apr 1 '11 at 5:48

1 Answer 1

up vote 2 down vote accepted

cd /backup ; find . -type f -printf '%P %s' | sort > backupcontent.txt.

Repeat for /home, then diff the resulting files.

%P %s are file name relative to the /home and /backup folders, and size. Add any attributes you care about.

This method assumes that a file that exists at both locations and is the same size (and other relevant attributes of your choice) is identical. You could additionally get file checksums using -exec.

share|improve this answer
    
Thanks it works. It turns out that there are files not in the ascii encoding that's not being backed up. –  huggie Apr 1 '11 at 6:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.