Horje
linux command if directory exists Code Example
linux command if directory exists
DIR="/etc/httpd/"
if [ -d "$DIR" ]; then
  ### Take action if $DIR exists ###
  echo "Installing config files in ${DIR}..."
else
  ###  Control will jump here if $DIR does NOT exists ###
  echo "Error: ${DIR} not found. Can not continue."
  exit 1
fi




Shell

Related
install pylatex Code Example install pylatex Code Example
ubuntu unable to write file Code Example ubuntu unable to write file Code Example
install python for latex or pylatex Code Example install python for latex or pylatex Code Example
is not in the sudoers file Code Example is not in the sudoers file Code Example
install pylatex no dependency Code Example install pylatex no dependency Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11