hadoop fs -test -e /path/exist if [ $? -eq 0 ] ;then echo 'exist' else echo 'Error! path is not exist' fi