title: bash checking directory existence hanging when NFS mount goes down
body: <p>I have a .bash_profile script that sets up some aliases for me based on directory existence:</p>
  
  <pre><code>if [ -d  /home/user/games ] ; then
    alias cdgames='cd /home/user/games'
  fi
  </code></pre>
  
  <p>One of these directory is on an NFS mount - if the filer becomes unresponsive <code>su - user</code> will hang on this line in .bash_profile.</p>
  
  <p>Is there any way to check existence of a directory in bash without causing a hang if the directory is mounted to an unresponsive filer?</p>