Lord diff

A big shout out to the amazing UNIX utility that is… diff.

I copied a large directory (15GB) from a USB hard disk to a local hard disk and wanted to verify the integrity of the files. After asking in a Unix forum and being pointed in two directions I thought… why not use diff?

What a great tool diff is. Not only can it compare files and show all sorts of useful output but it can also compare directories, recursively, if required.

So, my problem was solved with a quick:

diff -qr /home2/photos/thailand /media/usbdisk/photos/thailand

The -q option specifies that output is short (i.e. should not specifically show the changes, just state that differences exist) and the -r option specifies that it should recursively compare subdirectories.

Well done diff!

Tags:

Leave a Reply