Question: how to check if folder exists in bash?
Answer: You can use test -d (see man test ). -d file True if file exists and is a directory. Note: The test command is same as conditional expression [ (see: man [ ), so it's portable across shell scripts.