Posted By

krustyflakes on 03/08/11


Tagged


Versions (?)

Check if a folder exists


 / Published in: Bash
 

  1. DIR="/etc"
  2. if [ -d $DIR ]; then
  3. echo "Folder ${DIR} exists"
  4. else
  5. echo "Folder ${DIR} does NOT exists"
  6. fi
  7.  

Report this snippet  

You need to login to post a comment.