Explore Courses Blog Tutorials Interview Questions
0 votes
in Big Data Hadoop & Spark by (11.4k points)
edited by

-put and -copyFromLocal are documented as identical, while most examples use the verbose variant -copyFromLocal. Why?

1 Answer

0 votes
by (32.3k points)
edited by

There is no such big difference between both the commands(-put and -copyFromLocal),

you can either use the -copyFromLocal command or the -put command to move a local file into the distributed file system.

But -put is most robust, since it allows me to copy multiple file paths (files or directories) to HDFS at once, as well as it reads input from stding and writes it directly to HDFS. While on the other hand, copyFromLocal is restricted to a local file reference.


hadoop fs -copyFromLocal <localsrc> URI


hadoop fs -put [-f] [-p] [-l] [-d] [ - | <localsrc1> .. ]. <dst>

Refer the following video tutorial that will teach you Hadoop from scratch:


Browse Categories