I am trying to find the differences in two directories(say old and new) and patching the old directory(in RHEL 4,GNU Patch).
I run
diff -Naur old_dir new_dir>patch
when i apply the patch by running the command
patch -p0<patch
It works fine till the time there is no new file in new_dir.
My problem is if there is any new file in new_dir which is not present in old_dir then patch command is removing the new file(after asking some questions).
Patch has entry of new file but why is it deleting it from the new_dir also?I want that this new file should be copied in the old_dir.How can i do this?Am i missing some switch in diff or patch ?