I have folder "F A" containing some subfolders and files and another folder "F B" containing the same folder structure but no file:
find . -type d
.
./F A
./F A/SF A
./F A/SF B
./F A/SF C
./F B
./F B/SF A
./F B/SF B
./F B/SF C
How can I write a mv
command to move any file under "F A" to its equivalent folder in "F B"?
find . -type f -exec mv {} "./F B" \;
will just mv
any file under "F A" to "F B", but not in its correct subfolder.