Hadoop fs -put command
I had a file in my local system and want to copy it to HDFS. can i use the copy command or Put command? How ?
To put hadoo you should try this code:
You can create one directory in HDFS using the command “hdfs dfs -mkdir ” and, then use the given below command to copy data from the local file to HDFS:
$ hdfs dfs -put /root/Hadoop/sample.txt /"your_hdfs_dir_path"
Alternatively, you can also use the below command.
$ hdfs dfs -copyFromLocal /root/Hadoop/sample.txt /"your_hdfs_dir_path