Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Big Data Hadoop & Spark by (32.1k points)
Can anyone tell me how to create file in Hadoop?

1 Answer

0 votes
by (45.3k points)

You can use the following HDFS Command to create a file in the Hadoop file system of file size 0 bytes.

Usage: hdfs dfs –touchz /directory/filename

Command: hdfs dfs –touchz /new_directory/sample

Note: With the above commands, we can create a file named “sample” in the directory “new_directory” of hdfs with file size 0 bytes.

If you want to learn Hadoop, I recommend this Hadoop Training program by Intellipaat.

You can check out this YouTube tutorial on Hadoop to know more:

Related questions

0 votes
1 answer
0 votes
1 answer
asked Aug 31, 2020 in Big Data Hadoop & Spark by Kasheeka (32.1k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...