Due to moving files back and forth from my Linux PC to a Mac, I now have a few documents that duplicate. Their names seem identical, but apparently they are codified slightly differently, like in this question.
For instance, ls
in a certain directory reports, among other things
'Voisin - Géométrie algébrique et espaces de modules.pdf'
'Voisin - Géométrie algébrique et espaces de modules.pdf'
These really look the same, but using the command ls | LC_ALL=C sed -n l
as suggested in the above question, I get
Voisin - Ge\314\201ome\314\201trie alge\314\201brique et espaces de m\
odules.pdf$
Voisin - G\303\251om\303\251trie alg\303\251brique et espaces de modu\
les.pdf$
Now, I have a directory tree full of such "duplicates". Is there a way to
- find them all
- for each duplicate pair, move one of them to an external directory? (I don't want to delete them right now, just in case I mess something up)
I think that the content is also identical, so the diff
should be nothing, but I am not sure, since I don't know a way to to be sure that I am running diff
on the two copies, as the paths look identical