Answers for "check if a folder is in $path linux"

10

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
Posted by: Guest on October-22-2020
3

how to check if in which folder are you present in linux

#linux command to check in which folder are you
pwd
Posted by: Guest on July-06-2021

Code answers related to "check if a folder is in $path linux"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language