mv

Moves files from source to destination on the HDFS file system. This command allows multiple sources and in this case, the destination must be a directory. Moving files between different file systems is prohibited.

Returns 0 on success and -1 on error.

The usage is as follows:

$ hadoop fs -mv URI [URI ...] <dest>

Example:

$ hadoop fs -mv /user/hadoop/file1 /user/hadoop/file2
$ hadoop fs -mv hdfs://nn.example.com/file1 hdfs://nn.example.com/file2 hdfs://nn.example.com/file3 hdfs://nn.example.com/dir1
Found a mistake? Seleсt text and press Ctrl+Enter to report it