title: How to un-patch a directory/file on Linux?
body: <p>How can I un-patch a file and a directory form a patched one.</p>
  <p>I have applied both a patch <code>pd.patch</code> on a directory and a patch <code>pf.patch</code> on a file with those two commands:</p>
  <pre><code>patch -p1 &lt; pd (in the directory) 
  
  patch -p1 file_unpatch &lt; pf.patch . ( will give me file_patch(patched file_unpatch)) 
  </code></pre>
  <p>How can i retrieve original <code>file_unpatch</code> and the <code>unpatched</code> directory?</p>
  <p><strong>EDIT</strong>
  I have figured out we can un-patch a directory using the <code>-R</code> option:</p>
  <pre><code>patch -p1 -R &lt; pd (in the directory) --&gt; will give me unpatched directory.
  </code></pre>
  <p>Now, what about un-patching the file?</p>