if shell file or folder do not exist code example Example: linux shell check if directory does not exists if [ ! -d directory ]; then mkdir directory fi