Posix Index Page 1

Bash: How to Check if a directory exists?

If you need to check if directory exists use: if [ -d "$DIR" ];. Check here for details when you have symbolic links.