Search

hadoop fs -mkdir

The hadoop mkdir command is for creating directories in the hdfs. You can use the -p option for creating parent directories. This is similar to the unix mkdir command. The usage example is shown below:
> hadoop fs -mkdir /user/DPhadoop/hadoopdemo

The above command creates the hadoopdemo directory in the /user/hadoop directory.
> hadoop fs -mkdir -p /user/DPhadoop/dir1/dir2/demo

The above command creates the dir1/dir2/demo directory in /user/hadoop directory.