Created
October 11, 2016 16:42
-
-
Save andyvanee/420e103f530ca724f91391cabf806e3d to your computer and use it in GitHub Desktop.
Show a diff of two directory trees
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 | |
# | |
# Both find commands will output the file name without prefix as well as the file size | |
# `diff -u` outputs a diff format compatible with gist files with the .diff extension | |
# -printf does not work with OSX find unfortunately | |
# | |
diff -u <(find $1 -type f -printf '%s %P\n') <(find $2 -type f -printf '%s %P\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment