Solved

Patching problem

Posted on 2004-09-13
4
351 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

705 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

13 Experts available now in Live!

Get 1:1 Help Now