Answers for "check if directory exists in bash script"

C#
10

shell script to check the directory exists

Directory="/opt"
if [ -d "$Directory" ];
then
	echo -e "it's exitsn"
fi
### To check if it's not exists
if [ ! -d "$Directory" ];
then 
	echo -e "It's not theren"
fi
Posted by: Guest on December-31-2020
1

Check is directory exist shell

DIR="/etc/httpd/"
if [ -d "$DIR" ]; then
  # Take action if $DIR exists. #
  echo "Installing config files in ${DIR}..."
fi
Posted by: Guest on June-02-2021

Code answers related to "check if directory exists in bash script"

C# Answers by Framework

Browse Popular Code Answers by Language