how to delete a file from hdfs directory code example Example: delete file hdfs dfs hdfs dfs -rm -r /home/user/folder/*