I want to generate a list of files that have:
- Same name
- Different content
in a directory (including all children directories and content).
How to do? Bash, perl, anything is fine.
So, two files with the same name and same content should not show up.
Best Answer
Update: fixed a typo in the script: changed
print $NF
toprint $3
; also tidied things up, and added some comments.Assuming file names do not contain
\n
, the following prints out a sorted list which breaks (as in: section control breaks) at uniquefile name
, uniquemd5sum
, and shows the corresponding group of file paths.Output showing only file names with multiple
md5
sOutput showing all files with the same name.