I have two drives with the same files, but the directory structure is totally different.
Is there any way to 'move' all the files on the destination side so that they match the structure of the source side? With a script perhaps?
For example, drive A has:
/foo/bar/123.txt
/foo/bar/234.txt
/foo/bar/dir/567.txt
Whereas drive B has:
/some/other/path/123.txt
/bar/doo2/wow/234.txt
/bar/doo/567.txt
The files in question are huge (800GB), so I don't want to re-copy them; I just want to sync the structure by creating the necessary directories and moving the files.
I was thinking of a recursive script that would find each source file on the destination, then move it to a matching directory, creating it if necessary. But -- that's beyond my abilities!
Another elegant solution was given here: https://superuser.com/questions/237387/any-way-to-sync-directory-structure-when-the-files-are-already-on-both-sides/238086