Search

hadoop fs -put

Hadoop put command is used to copy multiple sources to the destination system. The put command can also read the input from the stdin. The different syntaxes for the put command are shown below:

Syntax1: copy single file to hdfs

hadoop fs -put localfile /user/DPhadoop/hadoopdemo

Syntax2: copy multiple files to hdfs

hadoop fs -put localfile1 localfile2 /user/DPhadoop/hadoopdemo

Syntax3: Read input file name from stdin

hadoop fs -put - hdfs://namenodehost/user/DPhadoop/hadoopdemo