Created
March 6, 2019 06:33
-
-
Save ProGM/3c30b8354101cbbbc59e2f74e5cd4821 to your computer and use it in GitHub Desktop.
Check differences between two folders in bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
tmpfile1=$(mktemp /tmp/report.XXXXXX) | |
tmpfile2=$(mktemp /tmp/report2.XXXXXX) | |
cd "$1" | |
find . >> $tmpfile1 | |
cd "$2" | |
find . >> $tmpfile2 | |
diff $tmpfile1 $tmpfile2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment