Search

hadoop fs -mv

It moves the files from source hdfs to destination hdfs. Hadoop mv command can also be used to move multiple source files into the target directory. In this case the target should be a directory.

The syntax is shown below:

hadoop fs -mv /user/DPhadoop/SrcFile /user/DPhadoop/TgtFile

hadoop fs -mv /user/DPhadoop/file1 /user/DPhadoop/file2 hdfs://namenodehost/user/DPhadoop/TgtDirectory