Solved

Patching problem

Posted on 2004-09-13
4
352 Views
Last Modified: 2010-04-20
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
Comment
Question by:dimitry
  • 2
4 Comments
 

Expert Comment

by:aadilfahad
ID: 12049331
It Is Possible And You Can Simply Read Out Each Information About This By That Weblink

www.linuxjalali.com/forum   in linux section
0
 
LVL 11

Author Comment

by:dimitry
ID: 12049390
Can you please be more specific. I didn't find any patching issue on this forum.
0
 
LVL 23

Accepted Solution

by:
Mysidia earned 250 total points
ID: 12049748
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
 
LVL 11

Author Comment

by:dimitry
ID: 12049855
Thanks Mysidia,
I wanted something else, but with merge I can achieve same result.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now