Wolle jo in patch oan in triem brûke fan Linux

Dit gids biedt in basis oersicht foar it tapassen fan in patch nei in programma of bestân.

It kommando dat brûkt wurdt by it tapassen fan patches is it patchbehearder mar om om in patch oan te passen is it diff-kommando ek brûkt om de ferskillen te ferfangen dy't nedich wêze moatte.

Wêrom wolle jo in patje oanmeitsje

Stel dan dat jo in HTML-triem hawwe as:



MySite </ title> <br> </ head> <br> <body> <br> <h1> Wolkom nei MySite </ h1> <br> </ body> <br> </ html> </p> <p> De boppeste boarne as jo yn in webbrowser lade sil de wurden "Wolkom by MySite" sjen litte. </p> <p> It is gewoan as programmearjen foar dêryn ferskate ferzjes fan deselde bestân. Foarbyld soe der dan ien ferzje wêze dy't de aktuele live ferzje is, dan soe in oare ferzje wêze oer de ûntwikkeling, dy't meardere feroaringen befetsje kin, úteinlik kin der in oare ferzje wêze op in frijlieder. </p> <p> De frijloftsjinst soe de ferzje wurde brûkt troch echte brûkers (dus yn dit gefal besikers fan de webside fan MySite). Lit ús sizze dat MySite by ferzje 1.0 is. Nei in ûntwikkelingsfaze meitsje jo in releasetafel dy't yn dit gefal 1.1 wêze soe. De ûntwikkelingsdiel kin foarôfgean fan 'e útlizzende ôfdieling wêze omdat it feroarings befetsje dy't net foar frijlitting yn ferzje 1.2 foarkomme, mar sil foar ferzje 1.1 wêze. </p> <p> Stel dan dat in brek wie wêrom MySite jo YourSite hjit. Jo kinne elke ôfdieling trochgean en feroaringen yn 'e libbensferzje, ûntwikkelingsferzje en frijlittingferzje fan jo kinne de wiziging as in heule pleat yn libje en it patch oan de ûntwikkelings- en frijloftsjinsten tapasse. </p> <h3> In wurktaal foarbyld </h3><p> Meitsje in triem mei de namme myfile.html mei de folgjende koade yn it: </p> <p> <html> <br> <head> <br> <title> MySite </ title> <br> </ head> <br> <body> <br> <h1> Wolkom nei MySite </ h1> <br> <p> Dit is in arbeide foarbyld fan in boarne koade. </ p> <br> </ body> <br> </ html> </p> <p> Meitsje in oare triem mei de namme myfile_v2.html mei de folgjende koade yn it: </p> <p> <html> <br> <head> <br> <title> YourSite </ title> <br> </ head> <br> <body> <br> <h1> Wolkom nei joSite </ h1> <br> <p> Dit is in arbeide foarbyld fan in boarne koade. </ p> <br> </ body> <br> </ html> </p> <p> De earste bestân is de oarspronklike webside mei de titel "Wolkom by MySite". De twadde bestân is itselde as de earste triem, útsein MyFile is omneamd nei YourFile yn 'e tekst. </p> <h3> Hoe meitsje de Diff-triem oan </h3><p> Om in patch te meitsjen moatte wy de ferskillen tusken myfile.html en myfile_v2.html útfiere. </p> <p> Wy kinne dit dwaan mei de diff kommando as folgjend: </p> <p> diff -u myfile.html myfile_v2.html> myfile.patch </p> <p> Jo kinne de myfile.patch-triem yn ' <a href="https://fy.eyewated.com/in-beginners-guide-nei-de-nano-editor/">e nano-editor opnij</a> iepenje om it te besjen: </p> <p> nano myfile.patch </p> <p> Linen dy't net wizige binne blêd. Linen dy't fuortsmiten binne werjûn yn read en linen dy't tafoege binne wurde yn grien werjûn. </p> <h3> Hoe jo it patch brûke mei it patchkommando </h3><p> Om it patch oan te meitsjen oan myfile.html kinne jo it folgjende kommando brûke: </p> <p> patch <myfile.patch </p> <h3> Hoe kinne jo in patje werjaan? </h3><p> Dit sil de feroaringen tapast wurde mei it diff-kommando nei de orizjinele triem myfile.html. </p> <p> As jo ​​it patch ferfiere wolle dat mynfile.html werom is op 'e manier dat it oarspronklik it folgjende kommando brûkte: </p> <p> patch -R <myfile.patch </p> <h3> Gearfetting </h3><p> It patchbehearder kin brûkt wurde om tapassingen yn in hiele triemtafelstruktuer te tapassen. </p> <p> Der binne fier better ark as it patchbehearder foar it meitsjen fan patchjes en it soargjen fan goede boarne kontrôle. </p> <p> Der is in reden dat safolle ûntwikkelingsprojekten GIT brûke foar boarnenkontrôle. GIT makket it maklik om in konsekwint wikseljende strategy te meitsjen. </p> <p> It kommando-patch is ok foar tapassing fan ferskillen nei in bash-skript of wat ienfâldich, mar jo kinne krekt sa maklik in reservekopy fan 'e bestannen meitsje dy't jo wolle dat jo de nije bestannen op itselde plak pleatse en ienfâldich kopiearje. </p> <p> Foar mear ynformaasje brûke de man kommando: </p> <p> man patch </p> </div> <div class="amp-related-wrapper"> <h2>Alike posts</h2> <div class="amp-related-content"> <a href="https://fy.eyewated.com/rcp-scp-ftp-kommando-foar-it-kopiearjen-fan-triemmen-tusken-kompjuters/"> <amp-img src="https://exse.eyewated.com/pict/5539df2b77f736b1-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/rcp-scp-ftp-kommando-foar-it-kopiearjen-fan-triemmen-tusken-kompjuters/">Rcp, scp, ftp - Kommando foar it kopiearjen fan triemmen tusken kompjûters</a></h3> <div class="amp-related-meta"> Linux </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/10-essential-linux-commands-foar-it-navigearjen-fan-jo-bestansysteem/"> <amp-img src="https://exse.eyewated.com/pict/f861705360ba3820-120x86.png" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/10-essential-linux-commands-foar-it-navigearjen-fan-jo-bestansysteem/">10 Essential Linux Commands foar it navigearjen fan jo bestânsysteem</a></h3> <div class="amp-related-meta"> Linux </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/hoe-kin-it-root-of-oare-bruker-bruke-fan-e-linux-kommando-line/"> <amp-img src="https://exse.eyewated.com/pict/6a073fed712d34fe-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/hoe-kin-it-root-of-oare-bruker-bruke-fan-e-linux-kommando-line/">Hoe kin it root of oare brûker brûke fan 'e Linux Kommando-line</a></h3> <div class="amp-related-meta"> Linux </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/de-beste-free-chess-games-foar-linux/"> <amp-img src="https://exse.eyewated.com/pict/446e811d1d322fbc-120x86.png" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/de-beste-free-chess-games-foar-linux/">De bêste Free Chess Games foar Linux</a></h3> <div class="amp-related-meta"> Linux </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/learje-de-linux-kommando-fergees/"> <amp-img src="https://exse.eyewated.com/pict/2b4c49e086363475-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/learje-de-linux-kommando-fergees/">Learje de Linux Kommando - fergees</a></h3> <div class="amp-related-meta"> Linux </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/how-to-convert-images-using-linux/"> <amp-img src="https://exse.eyewated.com/pict/be4d696d1eb4358d-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/how-to-convert-images-using-linux/">How to Convert Images Using Linux</a></h3> <div class="amp-related-meta"> Linux </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/wat-jo-witte-moatte-oer-it-sudo-kommando/"> <amp-img src="https://exse.eyewated.com/pict/7df30b752d232f71-120x86.png" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/wat-jo-witte-moatte-oer-it-sudo-kommando/">Wat jo witte moatte oer it Sudo Kommando</a></h3> <div class="amp-related-meta"> Linux </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/ethtool-linux-command-unix-command/"> <amp-img src="https://exse.eyewated.com/pict/8e9798e06ed9413c-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/ethtool-linux-command-unix-command/">Ethtool - Linux Command - Unix Command</a></h3> <div class="amp-related-meta"> Linux </div> </div> </div> <div class="amp-related-content"> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/chkconfig-linux-unix-kommando/">Chkconfig - Linux / Unix kommando</a></h3> <div class="amp-related-meta"> Linux </div> </div> </div> </div> <div class="amp-related-wrapper"> <h2>See Newest</h2> <div class="amp-related-content"> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/mad-catz-blaster-review/">Mad Catz Blaster Review</a></h3> <div class="amp-related-meta"> Gaming </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/kreatyf-ljocht-twinkle-yn-photoshop-elements-oanmeitsje/"> <amp-img src="https://exse.eyewated.com/pict/9ea353f40e3932c9-120x86.png" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/kreatyf-ljocht-twinkle-yn-photoshop-elements-oanmeitsje/">Kreatyf ljocht Twinkle yn Photoshop Elements oanmeitsje</a></h3> <div class="amp-related-meta"> Software </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/hoe-kinne-jo-triemen-mei-linux-bruke/"> <amp-img src="https://exse.eyewated.com/pict/e69436db969232aa-120x86.png" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/hoe-kinne-jo-triemen-mei-linux-bruke/">Hoe kinne jo triemen mei Linux brûke</a></h3> <div class="amp-related-meta"> Linux </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/in-ienfaldige-gids-om-te-selektearjen-fan-ferskate-berjochten-yn-macos-berjochten/"> <amp-img src="https://exse.eyewated.com/pict/79d977ddd08c3936-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/in-ienfaldige-gids-om-te-selektearjen-fan-ferskate-berjochten-yn-macos-berjochten/">In ienfâldige gids om te selektearjen fan ferskate berjochten yn macOS-berjochten</a></h3> <div class="amp-related-meta"> Macs </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/besparje-tagong-ta-in-outlook-pst-bestan-mei-in-wachtwurd/"> <amp-img src="https://exse.eyewated.com/pict/a156eeaf52e43b35-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/besparje-tagong-ta-in-outlook-pst-bestan-mei-in-wachtwurd/">Besparje tagong ta in Outlook PST-bestân mei in wachtwurd</a></h3> <div class="amp-related-meta"> Email & Messaging </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/de-ferskil-tusken-in-lcd-tv-en-in-plasma-tv/"> <amp-img src="https://exse.eyewated.com/pict/a7da7b5748ce39ff-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/de-ferskil-tusken-in-lcd-tv-en-in-plasma-tv/">De ferskil tusken in LCD-TV en in Plasma-tv</a></h3> <div class="amp-related-meta"> Thústheater </div> </div> </div> </div> <div class="amp-related-wrapper"> <h2>Sapid posts</h2> <div class="amp-related-content"> <a href="https://fy.eyewated.com/de-8-best-audio-technica-kopteksten-te-keap-yn-2018/"> <amp-img src="https://exse.eyewated.com/pict/8b54e65f776d4ac9-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/de-8-best-audio-technica-kopteksten-te-keap-yn-2018/">De 8 Best Audio-Technica-kopteksten te keap yn 2018</a></h3> <div class="amp-related-meta"> Kaartsjes fan guod </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/meitsje-jo-fotos-better-mei-gimp-kursussen/"> <amp-img src="https://exse.eyewated.com/pict/51e0f056636e33c1-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/meitsje-jo-fotos-better-mei-gimp-kursussen/">Meitsje jo foto's better mei GIMP-kursussen</a></h3> <div class="amp-related-meta"> Software </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/top-20-microsoft-office-tricks-en-tips-foar-eksperts/"> <amp-img src="https://exse.eyewated.com/pict/b937f8e082a13f9c-120x86.png" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/top-20-microsoft-office-tricks-en-tips-foar-eksperts/">Top 20 Microsoft Office Tricks en tips foar eksperts</a></h3> <div class="amp-related-meta"> Software </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/hoet-facetime-te-laden-is/"> <amp-img src="https://exse.eyewated.com/pict/7ac9a3f2820133f2-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/hoet-facetime-te-laden-is/">Hoe't FaceTime te laden is</a></h3> <div class="amp-related-meta"> IPhone & iPod </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/epson-powerlite-home-cinema-2030-3lcd-projector-review/"> <amp-img src="https://exse.eyewated.com/pict/fd405b954eb139cb-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/epson-powerlite-home-cinema-2030-3lcd-projector-review/">Epson PowerLite Home Cinema 2030 3LCD Projector Review</a></h3> <div class="amp-related-meta"> Product Reviews </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/get-airg-chat-op-e-kompjuter-mei-opera-mini-simulator/"> <amp-img src="https://exse.eyewated.com/pict/7e8b2cc2366f2f93-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/get-airg-chat-op-e-kompjuter-mei-opera-mini-simulator/">Get AirG Chat op 'e kompjûter mei Opera Mini Simulator</a></h3> <div class="amp-related-meta"> Software & Apps </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/foegje-in-e-mailadres-opnij-oan-jo-microsoft-akkount/"> <amp-img src="https://exse.eyewated.com/pict/4174b5c1d2ff4130-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/foegje-in-e-mailadres-opnij-oan-jo-microsoft-akkount/">Foegje in e-mailadres opnij oan jo Microsoft-akkount</a></h3> <div class="amp-related-meta"> Email & Messaging </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/wat-hinget-as-jo-jo-blu-ray-disc-spiler-sjen/"> <amp-img src="https://exse.eyewated.com/pict/cf3160026ff83a2e-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/wat-hinget-as-jo-jo-blu-ray-disc-spiler-sjen/">Wat hinget as jo jo Blu-ray-disc-spiler sjen</a></h3> <div class="amp-related-meta"> Thústheater </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/learje-in-hyperlink-yn-xml-te-meitsjen-mei-xlink/"> <amp-img src="https://exse.eyewated.com/pict/8c8586c24c923ec0-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/learje-in-hyperlink-yn-xml-te-meitsjen-mei-xlink/">Learje in hyperlink yn XML te meitsjen mei XLink</a></h3> <div class="amp-related-meta"> Webdesign & Dev </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/wat-is-in-wireless-access-point/"> <amp-img src="https://exse.eyewated.com/pict/16d100c89af53549-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/wat-is-in-wireless-access-point/">Wat is in Wireless Access Point?</a></h3> <div class="amp-related-meta"> Internet & Network </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/wat-is-in-edge-lit-led-tv/"> <amp-img src="https://exse.eyewated.com/pict/62daab0d85ed3fbb-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/wat-is-in-edge-lit-led-tv/">Wat is in Edge-Lit LED TV?</a></h3> <div class="amp-related-meta"> Thústheater </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/pegasus-mail-4-7-gratis-e-postprogramma/"> <amp-img src="https://exse.eyewated.com/pict/06f304c9af9a3412-120x86.png" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/pegasus-mail-4-7-gratis-e-postprogramma/">Pegasus Mail 4.7-Gratis e-postprogramma</a></h3> <div class="amp-related-meta"> Software & Apps </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/hoe-kinne-nintendo-3ds-parentales-ynsteld-wurde/"> <amp-img src="https://exse.eyewated.com/pict/a076076d926d352f-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/hoe-kinne-nintendo-3ds-parentales-ynsteld-wurde/">Hoe kinne Nintendo 3DS-parentales ynsteld wurde</a></h3> <div class="amp-related-meta"> Gaming </div> </div> </div> <div class="amp-related-content"> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/wat-betsjut-hmu/">Wat betsjut 'HMU'?</a></h3> <div class="amp-related-meta"> Internet & Network </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/wat-com-betsjut-yn-in-url/"> <amp-img src="https://exse.eyewated.com/pict/22ffc3dd6d152f43-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/wat-com-betsjut-yn-in-url/">Wat .COM betsjut yn in URL</a></h3> <div class="amp-related-meta"> Internet & Network </div> </div> </div> <div class="amp-related-content"> <a href="https://fy.eyewated.com/video-game-deathmatch-nba-2k16-vs-nba-live-16/"> <amp-img src="https://exse.eyewated.com/pict/79ded7a34fe03236-120x86.jpg" width="120" height="86" layout="responsive" class="amp-related-image"></amp-img> </a> <div class="amp-related-text"> <h3><a href="https://fy.eyewated.com/video-game-deathmatch-nba-2k16-vs-nba-live-16/">Video Game Deathmatch: NBA 2K16 vs NBA Live 16</a></h3> <div class="amp-related-meta"> Gaming </div> </div> </div> </div></article> <footer class="amp-wp-footer"> <div class="amp-wp-footer-inner"> <a href="#" class="back-to-top">Back to top</a> <p class="copyright"> © 2024 fy.eyewated.com </p> <div class="amp-wp-social-footer"> <a href="#" class="jeg_facebook"><i class="fa fa-facebook"></i> </a><a href="#" class="jeg_twitter"><i class="fa fa-twitter"></i> </a><a href="#" class="jeg_google-plus"><i class="fa fa-google-plus"></i> </a><a href="#" class="jeg_pinterest"><i class="fa fa-pinterest"></i> </a><a href="" class="jeg_rss"><i class="fa fa-rss"></i> </a> </div> </div> </footer> <div id="statcounter"> <amp-pixel src="https://c.statcounter.com/12022999/0/02d06b5d/1/"> </amp-pixel> </div> </body> </html> <!-- Dynamic page generated in 1.124 seconds. --> <!-- Cached page generated by WP-Super-Cache on 2019-10-03 22:06:40 --> <!-- 0.002 -->