Comparing two folders

Every now and then I need to compare two folders and list the differences. I would usually just use Meld, but sometimes it is more handy to get the output in the terminal. The thing is I always forget the exact command… So, as a future reference, here’s what I do:

I wanted to compare the old and new folder of slack-wallpapers and post the list of added pictures to the ChangeLog. It was as simple as that:

diff -qr ./slack-wallpapers-0.212/ ./slack-wallpapers-0.284/ | sort

That’s it! The hint is from here.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s