I've unpackaged a zip into the current location which we'll call /httpdocs, everything inside the zip resides in a directory which we'll call myfiles.
In /httpdocs are thousands of directories and files that also exist at exactly the same paths as in the myfiles directory.
I need to move the contents of the myfiles directory into /httpdocs whilst replacing any directories/files that already exist... recursively.
If I try from the myfiles directory:
mv * ../
I am asked if I want to overwrite if exists... y/n for every single file!
If I try from /httpdocs:
mv myfiles/* .
I am asked if I want to overwrite if exists... y/n for every single file!
If I try to apply the -f force operator, it returns that it cannot move because the Directory not empty.
Now from what I have read, it doesn't seem like what I am trying to do is achievable with the mv command which is probably why I am seem to be getting absolutely nowhere with this.
I am aware of cp and rsync and many others but I am not sure which command is the best to use to actually just move the contents of the directory to another location and overwrite if exists recursively.
I know I could do this easily by just uploading to /httpdocs via FTP in any local client and just 'Yes to all' on the overwrite dialogue but it would just take ages so not always practical - I'm just after a like-for-like over the command line really.