Okay so what I'm trying to do is that I have a file and I have to replace about 100 files in the location: /home/*/service*/files/
using that file recursively.
I used the following command:
cp -r File.txt /home/*/service*/files
cp: overwrite `/home/xxx/servicexxx/files/CustomCommands.txt'? y
cp: overwrite `/home/xxx/servicexxx/files/files/tips.txt'? ^C
Why is it creating a "files" folder inside a files folder instead of just replacing the already existing file. If I don't use the "-r" switch, it copies correctly but omits the other 99 directories showing "cp ommiting directory"
Secondly, I have to use the same method to replace a running binary file so that it would automatically switch to the new file next time the file is run. But I get this error:
cp: cannot create regular file `xxx': Text file busy