Benutzer-Werkzeuge

Webseiten-Werkzeuge


becki:linux:diffupgrade

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
becki:linux:diffupgrade [2010-02-05 19:30]
becki
becki:linux:diffupgrade [2011-06-08 16:26] (aktuell)
becki
Zeile 1: Zeile 1:
-====== Upgrading Configuration Files with the Diffutils ​== +====== Upgrading Configuration Files with a three-way File Merge == 
-===== Probelm ​==+===== Problem ​==
  
 When upgrading software (e.g. with [[slack_upgrade|slackpkg]]) you usually have customized the config files to your personal need. Now the config files of the new software version also differ from the original version. What you want is an easy way to get your own modifications into the new config files. When upgrading software (e.g. with [[slack_upgrade|slackpkg]]) you usually have customized the config files to your personal need. Now the config files of the new software version also differ from the original version. What you want is an easy way to get your own modifications into the new config files.
Zeile 15: Zeile 15:
  
   merge conf conf.org conf.new   merge conf conf.org conf.new
- 
-An alternative to the ''​merge''​ command is ''​diff3'',​ it should produce the same result: 
- 
-  diff3 -m conf conf.org conf.new > conf.out 
-  mv conf.out conf 
  
 After merging it is advisable to rename conf.new to be prepared for a future update: After merging it is advisable to rename conf.new to be prepared for a future update:
Zeile 25: Zeile 20:
   mv conf.new conf.org   mv conf.new conf.org
  
-Another ​tipAll ''​*.org''​ files can serve as a reminder for you to trace back all the modifications you did to the system. But sometimes you have to create a config file which did not exist before (e.g. ''​myConfigFile''​). In order not to forget such files during update, it is advisable to create an //empty// counterpart file ''​myConfFile.org''​.+<​note ​tip>All ''​*.org''​ files can serve as a reminder for you to trace back all the modifications you did to the system. But sometimes you have to create a config file which did not exist before (e.g. ''​myConfigFile''​). In order not to forget such files during update, it is advisable to create an //empty// counterpart file ''​myConfFile.org''​.</​note>​
  
 ===== Example where the tools fail == ===== Example where the tools fail ==
Zeile 49: Zeile 44:
                            ​Helga=9 ​      ​Helga=9 ​    ​Helga=9                            ​Helga=9 ​      ​Helga=9 ​    ​Helga=9
 </​code>​ </​code>​
 +
 +===== Alternatives ==
 +
 +  * An alternative to the ''​merge''​ command is ''​diff3'',​ it should produce the same result:<​code bash>
 +diff3 -m conf conf.org conf.new > conf.out
 +mv conf.out conf
 +</​code>​
 +  * A 2nd alternative to merge are the diff/patch tools. See [[diff patch tips]]
  
becki/linux/diffupgrade.1265398238.txt.gz · Zuletzt geändert: 2010-02-05 19:30 von becki

Impressum - Datenschutzerklärung