Hadoop HDFS – Deleting Files

Show files and directories:

$ hadoop fs -ls /myData/myFolder

 

Deleting Files:

$ hadoop fs -rm /myData/myFolder/myFile.txt

 

Deleting a Directory:

$ hadoop fs -rmdir /myData/myFolder
or
$ hadoop fs -rm -r /myData/myFolder

Published by

Ferdy Mañago

Portland, Oregon