Help me, lazyweb.
May. 6th, 2014 11:08 amDue to (inherited, not my fault) poor planning, I have a folder structure with a few million files in a few tens of thousands of nested folders.
These folders are all stored in an ext3 file system, which is case sensitive.
They are largely being accessed by Windows clients, which are not case sensitive, via Samba, which is kinda case sensitive but mostly defers to Windows.
These files are being collected from other places, and being dropped into this location by both Windows and Linux clients.
There are an unknown-but-at-least-three-so-far number of folders with the same name, differing only in case - eg "Pogo" and "POGO". And this is a royal pain in the ass when a Linux rsync job drops files from otherplace\POGO into thisplace\POGO and then a Windows user clicks on POGO and gets the contents of Pogo because it's alphabetically first and it's the same name and thus the same folder, right? Hey, where are my files? Why aren't my files there?
There's gotta be an easy way - some "find" flag or some reasonably non-stupid bash script - to get a list of all cases where there's multiple paths differing only in case, that I can wind up and let run on this for a week or so and find all the duplicates. Ideally there'd also be a way to trigger an automated rename on one of them, but a complete list would be a perfectly cromulent start.
I mean, I *could* write a script to do it. But I don't WANNA. This is a wheel that has to have been invented previously, right? Someone's got a magic spell to do this in a much simpler way?
These folders are all stored in an ext3 file system, which is case sensitive.
They are largely being accessed by Windows clients, which are not case sensitive, via Samba, which is kinda case sensitive but mostly defers to Windows.
These files are being collected from other places, and being dropped into this location by both Windows and Linux clients.
There are an unknown-but-at-least-three-so-far number of folders with the same name, differing only in case - eg "Pogo" and "POGO". And this is a royal pain in the ass when a Linux rsync job drops files from otherplace\POGO into thisplace\POGO and then a Windows user clicks on POGO and gets the contents of Pogo because it's alphabetically first and it's the same name and thus the same folder, right? Hey, where are my files? Why aren't my files there?
There's gotta be an easy way - some "find" flag or some reasonably non-stupid bash script - to get a list of all cases where there's multiple paths differing only in case, that I can wind up and let run on this for a week or so and find all the duplicates. Ideally there'd also be a way to trigger an automated rename on one of them, but a complete list would be a perfectly cromulent start.
I mean, I *could* write a script to do it. But I don't WANNA. This is a wheel that has to have been invented previously, right? Someone's got a magic spell to do this in a much simpler way?