0 votes
1 view
in Big Data Hadoop & Spark by (31.6k points)
Can anyone tell me how to create file in Hadoop?

1 Answer

0 votes
by (32.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:

Welcome to Intellipaat Community. Get your technical queries answered by top developers !