Warning: Undefined variable $kind in /home4/wgate/public_html/include/checkfunpdo.php on line 662

Warning: Undefined variable $vers in /home4/wgate/public_html/include/checkfunpdo.php on line 662

Warning: Undefined variable $kind in /home4/wgate/public_html/include/checkfunpdo.php on line 662

Warning: Undefined variable $vers in /home4/wgate/public_html/include/checkfunpdo.php on line 662
:::| 目前位置圖示目前位置:首頁圖示回首頁 | 主功能頁圖示相關問答
Shell Script檢查檔案及目錄是否存在

[日期]:2018/06/28  [瀏覽人數]:536

#!/bin/sh

if [-d "/backups"]; then

    echo "Directory /backups exists"

else

    echo "Directory /backups does not exists"

fi

若要檢查檔案是否存在則-d改為-f