How to find if a directory exists in bash:
DIR="/etc"
if [ -d $DIR ]; then
echo "Folder ${DIR} exists"
else
echo "Folder ${DIR} does NOT exists"
fi
How to find if a directory exists in bash:
DIR="/etc"
if [ -d $DIR ]; then
echo "Folder ${DIR} exists"
else
echo "Folder ${DIR} does NOT exists"
fi
Leave a Reply
You must be logged in to post a comment.