<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Diff on Amit Agarwal Linux Blog</title>
    <link>/tags/diff/</link>
    <description>Recent content in Diff on Amit Agarwal Linux Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Wed, 17 Oct 2012 01:15:01 +0000</lastBuildDate>
    
	<atom:link href="/tags/diff/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>meld – cvs diff with ease</title>
      <link>/2012/10/17/meld-cvs-diff-ease/</link>
      <pubDate>Wed, 17 Oct 2012 01:15:01 +0000</pubDate>
      
      <guid>/2012/10/17/meld-cvs-diff-ease/</guid>
      <description>&lt;figure style=&#34;width: 220px&#34; class=&#34;wp-caption alignright&#34;&gt;&lt;a href=&#34;http://commons.wikipedia.org/wiki/File:Revision_controlled_project_visualization-2010-24-02.svg&#34; target=&#34;_blank&#34;&gt;&lt;img class=&#34;zemanta-img-inserted zemanta-img-configured&#34; title=&#34;Visualization of the &amp;quot;history tree&amp;quot; ...&#34; src=&#34;http://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Revision_controlled_project_visualization-2010-24-02.svg/220px-Revision_controlled_project_visualization-2010-24-02.svg.png&#34; alt=&#34;Visualization of the &amp;quot;history tree&amp;quot; ...&#34; width=&#34;220&#34; height=&#34;540&#34; /&gt;&lt;/a&gt;&lt;figcaption class=&#34;wp-caption-text&#34;&gt;Visualization of the &amp;#8220;history tree&amp;#8221; of a revision controlled project, showing branching, merging, tagging, etc. (Photo credit: Wikipedia)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;There are couple of ways to make life easier with &lt;a class=&#34;zem_slink&#34; title=&#34;Concurrent Versions System&#34; href=&#34;http://savannah.nongnu.org/projects/cvs&#34; rel=&#34;homepage&#34; target=&#34;_blank&#34;&gt;CVS&lt;/a&gt; &lt;a class=&#34;zem_slink&#34; title=&#34;Diff&#34; href=&#34;http://en.wikipedia.org/wiki/Diff&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;diff&lt;/a&gt;. But here is one that is really good.&lt;br&gt;
First if you haven’t, install &lt;a class=&#34;zem_slink&#34; title=&#34;Meld (software)&#34; href=&#34;http://meld.sf.net&#34; rel=&#34;homepage&#34; target=&#34;_blank&#34;&gt;meld&lt;/a&gt;:&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;sudo yum install meld&lt;/pre&gt;
&lt;p&gt;meld is basically a diff viewer and pretty good at it 😉&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Compare files excluding certain lines.</title>
      <link>/2011/10/18/compare-files-excluding-lines/</link>
      <pubDate>Tue, 18 Oct 2011 11:12:15 +0000</pubDate>
      
      <guid>/2011/10/18/compare-files-excluding-lines/</guid>
      <description>&lt;p&gt;Quick tip, you can use any expression for the &lt;a class=&#34;zem_slink&#34; title=&#34;Sed&#34; href=&#34;http://en.wikipedia.org/wiki/Sed&#34; rel=&#34;wikipedia&#34;&gt;sed&lt;/a&gt; commands in the (). With this trick you can redirect the &lt;a class=&#34;zem_slink&#34; title=&#34;Standard streams&#34; href=&#34;http://en.wikipedia.org/wiki/Standard_streams&#34; rel=&#34;wikipedia&#34;&gt;stdout&lt;/a&gt; of 2 commands to the diff command. This might become very useful, if you want to compare 2 &lt;a class=&#34;zem_slink&#34; title=&#34;Computer file&#34; href=&#34;http://en.wikipedia.org/wiki/Computer_file&#34; rel=&#34;wikipedia&#34;&gt;files&lt;/a&gt;, excluding the first  line.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;diff &amp;lt;(sed &#39;1d&#39; file) &amp;lt;(sed &#39;1d&#39; file2)&lt;/pre&gt;
&lt;p&gt;More interesting example is where the string &lt;a class=&#34;zem_slink&#34; title=&#34;American Broadcasting Company&#34; href=&#34;http://abc.go.com&#34; rel=&#34;homepage&#34;&gt;ABC&lt;/a&gt; is converted to abc before comparing in the second file with the following command:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Find out why a program can&#39;t seem to access to a file</title>
      <link>/2010/05/05/find-program-access-file/</link>
      <pubDate>Wed, 05 May 2010 15:19:18 +0000</pubDate>
      
      <guid>/2010/05/05/find-program-access-file/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&lt;tt&gt;$ strace php tias.php -e open,access 2&amp;gt;&amp;amp;1 | &amp;lt;a class=&amp;quot;zem_slink freebase/en/grep&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Grep&amp;quot; title=&amp;quot;Grep&amp;quot; rel=&amp;quot;wikipedia&amp;quot;&amp;gt;grep&lt;/a&gt; foo.txt&lt;/tt&gt; Sometimes a program refuses to read a file and you&amp;amp;#8217;re not sure why. You may have display_errors turned off for &amp;lt;a class=&amp;quot;zem_slink freebase/en/php&amp;quot; href=&amp;quot;http://www.php.net/&amp;quot; title=&amp;quot;PHP&amp;quot; rel=&amp;quot;homepage&amp;quot;&amp;gt;PHP&lt;/a&gt; or something. In this example, fopen(&amp;amp;#8217;/var/www/test/foo.txt&amp;amp;#8217;) was called but doesn&amp;amp;#8217;t have read access to foo.txt.&lt;/p&gt;
&lt;p&gt;Strace can tell you what went wrong. E.g., if php doesn&amp;amp;#8217;t have read access to the file, strace will say &amp;amp;#8221;EACCESS (Permission denied)&amp;amp;#8221;. Or, if the &amp;lt;a class=&amp;quot;zem_slink freebase/guid/9202a8c04000641f8000000000220ffa&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Path_%28computing%29&amp;quot; title=&amp;quot;Path (computing)&amp;quot; rel=&amp;quot;wikipedia&amp;quot;&amp;gt;file path&lt;/a&gt; you gave doesn&amp;amp;#8217;t exist, strace will say &amp;amp;#8221;ENOENT (No such file or directory)&amp;amp;#8221;, etc.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Diff Linux command — Find the difference in files the easier way.</title>
      <link>/2009/09/17/diff-linux-command-find-the-difference-in-files-the-easier-way/</link>
      <pubDate>Thu, 17 Sep 2009 16:12:24 +0000</pubDate>
      
      <guid>/2009/09/17/diff-linux-command-find-the-difference-in-files-the-easier-way/</guid>
      <description>&lt;p&gt;In Linux you can use diff command to find the differences in file.&lt;/p&gt;
&lt;p&gt;What is interesting is that you can use &amp;amp;#8221;diff -u&amp;amp;#8221; to list the differences with &amp;amp;#8217;+&amp;amp;#8217; and &amp;amp;#8217;-&amp;amp;#8217; rather than sometimes confusing &amp;amp;#8217;&amp;gt;&amp;amp;#8217; and &#39;&amp;lt;&amp;amp;#8217;.&lt;/p&gt;
&lt;p&gt;Running the regular diff between two text files to see the differences is not so elegant for the human eye to decode. Luckily there are plenty of tools out there to make this easy.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
