How to check if a directory exists in Linux command line ... 2010年1月21日 - That is command line. You can type that into bash directly, or you can resume it to test -d /the/dir : test -d /the/dir && echo "exist" || echo "does ...