title: Unix - Permission denied
body: <p>I created two files in Unix, say <code>filename1</code> and <code>filename2</code>. I am able to see the contents of both the files. But when I am executing one command</p>
  
  <pre><code>filename1 &gt;&amp; filename2
  </code></pre>
  
  <p>I am not able to open the file <code>filename2</code>. It is throwing error</p>
  
  <pre><code>/.filename1 : Permission denied.
  </code></pre>
  
  <p>Complete code:</p>
  
  <pre><code>bash-4.3$ cat&gt;filename1
  Hi all
  bash-4.3$ cat&gt; filename2
  Hi all
  bash-4.3$ cat filename1
  Hi all
  bash-4.3$ cat filename2
  Hi all
  bash-4.3$ filename1 &gt;&amp; filename2
  bash-4.3$ cat filename1
  Hi all
  bash-4.3$ cat filename2
  bash: ./filename1:Permission denied
  </code></pre>