Horje
check folder exist else create linux 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
check folder exist else create linux
[[ -f <file> ]] && echo "This file exists!"

[ -f <file> ] && echo "This file exists!"




Shell

Related
how to get the filename without extension Code Example how to get the filename without extension Code Example
asus router reset cache Code Example asus router reset cache Code Example
find files linux newer than Code Example find files linux newer than Code Example
how to add new path to sudoers Code Example how to add new path to sudoers Code Example
brew gcc arm install Code Example brew gcc arm install Code Example

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