You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Ben Kucinich <be...@gmail.com> on 2008/02/07 20:34:35 UTC

Difference between put and copyFromLocal?

In bin/hadoop dfs command I find these two options which seems similar to me.

           [-put <localsrc> <dst>]
           [-copyFromLocal <localsrc> <dst>]

Is there any difference between -put command and -copyFromLocal command?

Similarly what is the difference between -get command and -copyToLocal?

Re: Difference between put and copyFromLocal?

Posted by Martin Traverso <mt...@gmail.com>.
They are equivalent. From the source code:

      if ("-put".equals(cmd) || "-copyFromLocal".equals(cmd)) {
        copyFromLocal(new Path(argv[i++]), argv[i++]);


      if ("-get".equals(cmd) || "-copyToLocal".equals(cmd)) {
        copyToLocal(argv, i);

Martin


On Feb 7, 2008 11:34 AM, Ben Kucinich <be...@gmail.com> wrote:

> In bin/hadoop dfs command I find these two options which seems similar to
> me.
>
>           [-put <localsrc> <dst>]
>           [-copyFromLocal <localsrc> <dst>]
>
> Is there any difference between -put command and -copyFromLocal command?
>
> Similarly what is the difference between -get command and -copyToLocal?
>