title: make diff to ignore symbolic link
body: <p>My project has the following structure</p>
  
  <pre><code>/project/config.mk
  /project/dir1/config.mk -&gt; ../config.mk
  /project/dir2/config.mk -&gt; ../config.mk
  </code></pre>
  
  <p>When I used <code>diff</code> to create the patch file, the <code>/project/config.mk</code> was done correctly, but the two symbolic links got some problems. They were both  treated as new files, the diff sections were the whole content of the <code>config.mk</code> file. I tried to find a <code>diff</code> option to disable following symbolic link, but there is no such option available. Any suggestions are appreciated.</p>
  
  <p>As Overbose's suggestion, I create this script. It works. Thank everyone for taking time answering.</p>
  
  <pre><code>#!/bin/sh -v
  ori_dir=$1
  new_dir=$2
  patch_file=./patch_file
  if [ -f ${patch_file} ]
  then
          rm ${patch_file}
  fi
  ori_files=`cd ${ori_dir} ; find ./ -type f ! -type l`
  for i in ${ori_files} ; do 
          if [ -f ${ori_dir}/$i ] 
          then
                  if [ -f ${new_dir}/$i ]
                  then
                          diff -rup ${ori_dir}/$i ${new_dir}/$i &gt;&gt; ${patch_file}
                  fi
          fi
  done
  </code></pre>