Hadoop mkdir
In Hadoop, you can create a new directory in the Hadoop Distributed File System (HDFS) using the hadoop fs -mkdir
command. This command allows you to create a directory in a specified HDFS path.
The basic syntax of the hadoop fs -mkdir
command is as follows:
hadoop fs -mkdir <hdfs-path>
<hdfs-path>
: This is the path in HDFS where you want to create a new directory.
Here’s how to use the hadoop fs -mkdir
command to create a directory in HDFS:
Open a terminal or command prompt on a machine that has Hadoop installed and configured.
Use the
hadoop fs -mkdir
command to create a new directory in HDFS. Replace<hdfs-path>
with the desired HDFS path for your new directory.bashhadoop fs -mkdir /user/username/new_directory
/user/username/
: You can specify the HDFS directory where you want to create the new directory. Replaceusername
with your Hadoop username or the desired path.
Press Enter to execute the command. Hadoop will create the specified directory in HDFS.
To verify that the directory was created, you can use the
hadoop fs -ls
command to list the contents of the parent directory:bashhadoop fs -ls /user/username/
Replace
/user/username/
with the appropriate HDFS path.
Hadoop Training Demo Day 1 Video:
Conclusion:
Unogeeks is the No.1 IT Training Institute for Hadoop Training. Anyone Disagree? Please drop in a comment
You can check out our other latest blogs on Hadoop Training here – Hadoop Blogs
Please check out our Best In Class Hadoop Training Details here – Hadoop Training
Follow & Connect with us:
———————————-
For Training inquiries:
Call/Whatsapp: +91 73960 33555
Mail us at: info@unogeeks.com
Our Website ➜ https://unogeeks.com
Follow us:
Instagram: https://www.instagram.com/unogeeks
Facebook:https://www.facebook.com/UnogeeksSoftwareTrainingInstitute
Twitter: https://twitter.com/unogeeks