Shell中判斷HDFS中的文件或目錄是否存在

在Linux文件系統中,Shell腳本判斷某個文件是否存在:node # 這裏的-f參數判斷$file是否存在 if [ ! -f "$file" ]; then   echo "文件不存在!" fi Hadoop提供了test命令判斷HDFS上某個文件或目錄是否存在:web [root@node00 ~]# hdfs dfs -help ... -test -[defsz] <path> :
相關文章
相關標籤/搜索