title: View gzipped file content in hadoop
body: <p>How can I decompress and view few lines of a compressed file in hdfs.
  The below command displays the last few lines of the compressed data</p>
  
  <pre><code>hadoop fs -tail /myfolder/part-r-00024.gz
  </code></pre>
  
  <p>Is there a way I can use the -text command and pipe the output to tail command? I tried this but this doesn't work.</p>
  
  <pre><code>hadoop fs -text /myfolder/part-r-00024.gz &gt; hadoop fs -tail /myfolder/
  </code></pre>