title: How to convert txt to .gz / .z in Linux
body: <p>In Linux, how to convert txt to .gz / .z and how to view that converted tar file?</p>
  
  <p>I tried the command below, but it is not working.</p>
  
  <pre><code>tar -cf filename.z filename.txt
  tar -cf filebane.gz filename.txt
  zcat filename.z/gz
  </code></pre>
  
  <p>I get "bad command error".</p>