Try this script:
Code:
#! /bin/bash
# dirdiff - diff 2 directories
DIR1=/path/to/directory/1
DIR2=/path/to/directory/2
ls $DIR1 | sort > dir1.ls.tmp
# list files in dir1, sort them alphabetically, and store in temp file
ls $DIR2 | sort > dir2.ls.tmp
# same as dir 1, but for dir 2
echo "Differences are:"
diff dir1.ls.tmp dir2.ls.tmp
#Clean up time:
rm dir1.ls.tmp
rm dir2.ls.tmp
#EOF
*note: change this:
Code:
DIR1 = /path/to/directory/1
DIR2 = /path/to/directory/2
where /path/to/directory/1 is the path for the 1st dir, and same for the second.
Also - be sure to make it executable:
dirdiff was just an arbitrary name I chose - replace with a name you feel appropriate.
Also - make sure you're not in one of the directories when executing this, otherwise the diff will report the temp files as differences before they're deleted.