Skip to content

Instantly share code, notes, and snippets.

@ProGM
Created March 6, 2019 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ProGM/3c30b8354101cbbbc59e2f74e5cd4821 to your computer and use it in GitHub Desktop.
Save ProGM/3c30b8354101cbbbc59e2f74e5cd4821 to your computer and use it in GitHub Desktop.
Check differences between two folders in bash
#!/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