I have two folders, and I would like to do: cp -R folder1/ folder2/So that I all the sub folders missing in folder2 will be created, and there files copied. And all the folders in folder2 that are missing from folder1 stay the same.
How to override all folders with cp?
linux;cp
cp -R folder1/. folder2/You can use folder1/* instead, if you don't mind that * will not match hidden files which begin with a . like .bash_profile.If there are files in folder2 with the same name as files in folder1, they will be overwritten without prompting or warning.