Bash - Check if a file or directory exists Checking for a directory can be done as follows: Mícéal Gallagher in Bash 1 minutes