Friday, October 26, 2012

Linux - finding duplicate filenames in subdirectories

There are lots of complicated answers out there, this seems simpler and faster than all of them:
find . -maxdepth 2 -printf "%f\n" | sort | uniq -di
Apparently this will fail if you have file names containing new line characters.

No comments:

Post a Comment