#判斷目錄是否存在若是存在就刪除 hadoop fs -test -e /apps/user/model-cd if [ $? -eq 0 ] ;then hadoop dfs -rm -r /apps/user/model-cd; fi 複製代碼