<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://ca.wiki.guifi.net/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ca">
		<id>http://ca.wiki.guifi.net/w/index.php?action=history&amp;feed=atom&amp;title=Diff</id>
		<title>Diff - Historial de revisió</title>
		<link rel="self" type="application/atom+xml" href="http://ca.wiki.guifi.net/w/index.php?action=history&amp;feed=atom&amp;title=Diff"/>
		<link rel="alternate" type="text/html" href="http://ca.wiki.guifi.net/w/index.php?title=Diff&amp;action=history"/>
		<updated>2026-07-29T06:12:51Z</updated>
		<subtitle>Historial de revisió per a aquesta pàgina del wiki</subtitle>
		<generator>MediaWiki 1.22.0</generator>

	<entry>
		<id>http://ca.wiki.guifi.net/w/index.php?title=Diff&amp;diff=545&amp;oldid=prev</id>
		<title>Al: 1 revisió</title>
		<link rel="alternate" type="text/html" href="http://ca.wiki.guifi.net/w/index.php?title=Diff&amp;diff=545&amp;oldid=prev"/>
				<updated>2010-11-13T20:27:43Z</updated>
		
		<summary type="html">&lt;p&gt;1 revisió&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←Versió més antiga&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revisió de 20:27, 13 nov 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Cap diferència)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Al</name></author>	</entry>

	<entry>
		<id>http://ca.wiki.guifi.net/w/index.php?title=Diff&amp;diff=544&amp;oldid=prev</id>
		<title>Sergi: /* Vegeu també */</title>
		<link rel="alternate" type="text/html" href="http://ca.wiki.guifi.net/w/index.php?title=Diff&amp;diff=544&amp;oldid=prev"/>
				<updated>2009-08-26T14:31:48Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Vegeu també&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pàgina nova&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Instal·lació==&lt;br /&gt;
&lt;br /&gt;
El paquet que instal·la la comanda diff, té el mateix nom que la comanda, tal i com podeu veure amb&lt;br /&gt;
&lt;br /&gt;
 $ which diff&lt;br /&gt;
 /usr/bin/diff&lt;br /&gt;
 $ [[dpkg]] -S /usr/bin/diff&lt;br /&gt;
&lt;br /&gt;
Per tant per instal·lar-ho (si és que encara no ho teniu):&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install diff&lt;br /&gt;
&lt;br /&gt;
==Com crear un fitxer de patch amb diff==&lt;br /&gt;
&lt;br /&gt;
Si teniu dos fitxers, anomenats Fitxer1 i Fitxer1Modificat, podeu crear un [[patch]] (pegat) amb&lt;br /&gt;
&lt;br /&gt;
 $ diff -u oldFile newFile &amp;gt; mods.diff&lt;br /&gt;
&lt;br /&gt;
Sovint als fitxers també se'ls anomena amb la extensió patch:&lt;br /&gt;
&lt;br /&gt;
 $ diff -u oldFile newFile &amp;gt; mods.patch&lt;br /&gt;
&lt;br /&gt;
On:&lt;br /&gt;
&lt;br /&gt;
 -u  -U NUM  --unified[=NUM]&lt;br /&gt;
              Output NUM (default 3) lines of unified context.&lt;br /&gt;
&lt;br /&gt;
'''Recursos''':&lt;br /&gt;
*http://stephenjungels.com/jungels.net/articles/diff-patch-ten-minutes.html&lt;br /&gt;
&lt;br /&gt;
===Crear un pegat d'una carpeta i totes les subcarpetes i subfitxers===&lt;br /&gt;
&lt;br /&gt;
Primer cal obtenir una còpia de la carpeta original:&lt;br /&gt;
&lt;br /&gt;
 $ cp -R original new&lt;br /&gt;
&lt;br /&gt;
Ara feu els canvis a la carpeta new i creeu un pegat amb:&lt;br /&gt;
&lt;br /&gt;
 $ diff -rupN original/ new/ &amp;gt; original.patch&lt;br /&gt;
&lt;br /&gt;
On:&lt;br /&gt;
&lt;br /&gt;
 -r  --recursive&lt;br /&gt;
              Recursively compare any subdirectories found.&lt;br /&gt;
&lt;br /&gt;
 -u  -U NUM  --unified[=NUM]&lt;br /&gt;
              Output NUM (default 3) lines of unified context.&lt;br /&gt;
 &lt;br /&gt;
 -N  --new-file&lt;br /&gt;
              Treat absent files as empty.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
La opció -c és només per a C&lt;br /&gt;
&lt;br /&gt;
 -p  --show-c-function&lt;br /&gt;
              Show which C function each change is in.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Patch de carpetes i els seus subdirectoris===&lt;br /&gt;
&lt;br /&gt;
Assumint que el codi font original està a la carpeta '''Tb01''' i el codi modificat a '''Tb02''' i que hi han multiples fitxers i subdirectoris en ambdues carpetes:&lt;br /&gt;
&lt;br /&gt;
 $ diff -crB Fitxer1 Fitxer1Modificat &amp;gt; Fitxer1Modificat.patch&lt;br /&gt;
&lt;br /&gt;
Segons el manual ([man diff]):&lt;br /&gt;
&lt;br /&gt;
 -B  --ignore-blank-lines&lt;br /&gt;
              Ignore changes whose lines are all blank.&lt;br /&gt;
 &lt;br /&gt;
 -c  -C NUM  --context[=NUM]&lt;br /&gt;
              Output NUM (default 3) lines of copied context.&lt;br /&gt;
 &lt;br /&gt;
  -r  --recursive&lt;br /&gt;
              Recursively compare any subdirectories found.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Vegeu també==&lt;br /&gt;
&lt;br /&gt;
*[[patch]]&lt;br /&gt;
*[[Subversion]]&lt;br /&gt;
*[[CVS]]&lt;br /&gt;
*[[meld]]&lt;br /&gt;
&lt;br /&gt;
==Enllaços externs==&lt;br /&gt;
&lt;br /&gt;
*http://en.wikipedia.org/wiki/Diff&lt;br /&gt;
*http://www.gnu.org/software/diffutils/&lt;/div&gt;</summary>
		<author><name>Sergi</name></author>	</entry>

	</feed>