Created
October 7, 2015 00:27
-
-
Save nottrobin/24fb23f08afb65d6c49d to your computer and use it in GitHub Desktop.
Recursively find duplicate filenames in a directory tree
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
| #!/bin/sh | |
| dirname=Pictures | |
| find $dirname -type f | sed 's_.*/__' | sort| uniq -d| | |
| while read fileName | |
| do | |
| find $dirname -type f | grep "$fileName" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment