title: Access Hive tables and dump the query to txt file
body: <p>I am trying to access hive table and dump the result back into text file. And when I try to do this, I always get the permission denied? Is there something I am missing?</p>
  
  <pre><code>bash-3.00$ 'select * from ATTRIBUTE_DATA_REALTIME LIMIT 10' &gt; test.txt
  bash: test.txt: Permission denied
  </code></pre>
  
  <p>And what permission I need in this case? Or my query is wrong?</p>