hadoop fs -put and hadoop fs -copyFromLocal both are same means it'll copy the data from local to hdfs and local copy also available and it's working like copy & paste.
hadoop fs -moveFromLocal command working as cut & paste means it'll move the file from local to hdfs, but local copy is not available.
Both are same intention just copy data from local system to HDFS, most often every Hadoop developer should aware of it.
Usage: hdfs dfs -put ...
Copy single src, or multiple srcs from local file system to the destination file system. Also reads input from stdin and writes to destination file system.
hdfs dfs -put localfile /user/hadoop/hadoopfile hdfs dfs -put localfile1 localfile2 /user/hadoop/hadoopdir hdfs dfs -put localfile hdfs://nn.example.com/hadoop/hadoopfile hdfs dfs -put - hdfs://nn.example.com/hadoop/hadoopfile Reads the input from stdin.
Usage: hdfs dfs -copyFromLocal URI
Similar to put command, except that the source is restricted to a local file reference. hdfs dfs -copyFromLocal '/home/venu/Desktop/somethingfile.xml' hdfs://nn.example.com/hadoop/
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!