• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 360
  • Last Modified:

Patching problem

Usually patch is done by:
  diff -Naur file1 file2 > patch.1
And to patch file2:
  patch < patch.1

Now let's assume that I want to patch file2 with the differences from file1. However all the initial differences of file2 I want to keep.
In other words I want to apply only '+' changes in patch.1 but not to apply '-'.

Is it possible ? And if yes, how can I do this...
0
dimitry
Asked:
dimitry
  • 2
1 Solution
 
aadilfahadCommented:
It Is Possible And You Can Simply Read Out Each Information About This By That Weblink

www.linuxjalali.com/forum   in linux section
0
 
dimitryAuthor Commented:
Can you please be more specific. I didn't find any patching issue on this forum.
0
 
MysidiaCommented:
What are you trying to do exactly?

Your commands would take the differences between file1 and file2, then
apply them to file1.

If you're trying to do a 3-way merge changes from one set of files into a third
then the command you should be using is merge...

see http://www.die.net/doc/linux/man/man1/merge.1.html
0
 
dimitryAuthor Commented:
Thanks Mysidia,
I wanted something else, but with merge I can achieve same result.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now