I would like to know in Linux any command which will replace a file without affecting the running process.
I tried the mv command bug the running process is not taking the new file.
Any rsync option is available like this for not affecting the current process.
There is no universal command for that. It completely depends on the process that is running, if it will take a new file, I assume you mean a config config, or not.
You can try to send a kill -1 in hope the signal will be caught and it re-reads it's config. But if such a signal is handled also depends on the process that is running, if it is implemented. Many demons behave like that.
Some demons have a reload parameter.
Anyway, maybe make it easier for us, to tell us, which process or application you are talking about.
This seems to be a bit vague. "without affecting the running process". One issue here is "what is the runnig process doing to the file". Is it reading? Is it writing". You could have tried to copy the file.
Files do not work that way... If they "affect the running process", they do so because the process is reading them. If they are reading them, how could they not be effected?
So your question is vague and doesn't make a lot of sense to me on the face of it. Could you explain your actual goal please?