
上QQ阅读APP看书,第一时间看更新
Creating a directory in HDFS
The following command will create a directory called hdfs dfs -ls /
hadooptest in the root of the HDFS file system:
$ hdfs dfs -mkdir /hadooptest
Now execute the following command to list the files and directories present in HDFS, and to verify that the previous command executed successfully and has created a directory for us:
$ hdfs dfs -ls /
The preceding command lists the files and directories present in the Hadoop file system. The output will be similar to the following figure. The following screenshot shows only one directory, hadooptest, which we have just created. No other file and directory is present as it's a fresh installation:

Figure-3.2.1