Compare contents of two directories in bash

It’s always good when you are looking for a way to do a task and you find great one-liner that just does the job right:

diff -rq directory1/ directory2

Switches “r” and “q” will recursively compare the two directories and showing brief output.

I wanted to test this and ideal candidate for thiss was my ScummVM collection on my laptop and on my NAS storage. I used following command:

diff -rq ScummVM/ /mnt/volume_2/games/scummvm/

 

Leave a Reply

Your email address will not be published. Required fields are marked *