title: How to get Disk space(Avail) using 'df -h' when Filesystem is long
body: <p>I am trying to find available disk space through console</p>
  
  <p>I found <code>df -h | awk '$NF == "/" { print $4 }'</code> to get required output.</p>
  
  <pre><code>[root@tmpe2etstmsdc01 ~]# df -h
  Filesystem                                                 Size  Used Avail Use% Mounted on
  /dev/mapper/vg_root-lv_root                                542G   22G  492G   5% /
  tmpfs                                                      127G     0  127G   0% /dev/shm
  </code></pre>
  
  <blockquote>
    <p>Avail</p>
  </blockquote>
  
  <pre><code>[root@tmpe2etstmsdc01 ~]# df -h | awk '$NF == "/" { print $4 }'
  492G
  </code></pre>
  
  <p>This gives <code>Use%</code> value when <code>Filesystem</code> is long</p>
  
  <pre><code>[root@ldrnr-tlsmsdc16 ~]# df -h
  Filesystem            Size  Used Avail Use% Mounted on
  /dev/mapper/vg_root-lv_root
                     16G   16G     0 100% /
  tmpfs             1.9G     0  1.9G   0% /dev/shm
  </code></pre>
  
  <p>Here, the command gives <code>Use%</code> instead of <code>Avail</code></p>
  
  <pre><code>[root@ldrnr-tlsmsdc16 ~]# df -h | awk '$NF == "/" { print $4 }'
  100%
  </code></pre>
  
  <p>How can i get <code>Avail</code> in this condition?</p>