[plug] comparing directories (to verify backup mechanism)

Anthony J. Breeds-Taurima tony at cantech.net.au
Mon Feb 3 08:42:17 WST 2003


On 2 Feb 2003, Daniel wrote:

> Hello All,
> I want to backup some directories and verify them when restored
> elsewhere.  Md5sum won't work on directories 
> (guru can do it recursively, but I'm hoping there's an easier way).
> 
> There is a recursive diff command:
> diff -r dir1 dir2

diff -arN --brief dir1 dir2

Is probab;y better, as it will include new files and only say:
dir1/file and dir2/file differ rather than the actual differences.
Also it will be _slightly_ quicker as diff will stop scanning one it finds a
difference.  It should also handle binary files better.

Having said that you could probably use rsync in dry-run mode and snarf the
output, either way it's not quick.
 

Yours Tony.

/*
 * "The significant problems we face cannot be solved at the 
 * same level of thinking we were at when we created them."
 * --Albert Einstein
 */



More information about the plug mailing list