0 votes
1 view
in Big Data Hadoop & Spark by (11.5k points)
edited by

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

1 Answer

0 votes
by (31k 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:


Welcome to Intellipaat Community. Get your technical queries answered by top developers !