Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to compare directories using diff

📅 2014-Jul-14 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ diff ⬩ 📚 Archive

The diff tool can be used to compare not just files, but entire directories too. I find this useful to compare two directory trees and find the files that differ.

$ diff --quiet --recursive dir1 dir2

Or the shorter version:

$ diff -qr dir1 dir2

Tried with: Ubuntu 14.04


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧