move and copy commands of Hadoop

Posted at  05:29  |  in  HDFS

-mv Command:

This command is used to move the contents from source to destination. This command is even used for renaming. When moving multiple files, the destination must be a Directory.The following is the syntax of move command.
  • -mv <src> <dst>
here, src represent Source, and dst represent Destination.

Hadoop -mv command
Hadoop -mv command
In the above figure, /user/root/emp1/part-m-00000 is the source file, where as /Mydir2 is the destination.

-cp Command:

This command is used to copy the file from source to destination. When copying multiple files, the destination must be a Directory. The following is the syntax of copy command.
  • -cp <src> <dst>

Hadoop cp command
Hadoop cp command

Share this post

About-Privacy Policy-Contact us
Copyright © 2013 Hadoop Tutor. Blogger Template by Bloggertheme9
Proudly Powered by Blogger.
back to top