shell - How to check directory exist or not in linux.? - Stack Overflow

shell - How to check directory exist or not in linux.? - Stack Overflow

瀏覽:740
日期:2025-04-30
With bash/sh/ksh, you can do: if [ ! -d /directory/to/check ]; then mkdir -p /directory/ toc/check fi. For files, replace -d with -f , then you can do ......看更多