How to check if a directory exists in Linux bash shell?

To check if a directory exists in a bash shell script, use the following:

To check if a directory does not exists in a bash shell script, use the following:

Leave a Reply