a1f48ae28e25a084deabc09827be12b05f025f9f
[www.git] / src / tricks / find_same_files.sh
1 #!/bin/bash
2
3 # Find same files in a given directory
4
5 set -e
6
7 if [ -z "$1" ]; then
8   SDIR="."
9 else
10   SDIR="$1"
11 fi
12
13 find "$SDIR" -type f -exec md5sum {} \; | sort -n | uniq -w32 -D