title: hadoop dfs -copyFromLocal src dest
body: <p>My question is that why do we need to specify a dest. The file which I am putting into hdfs does not necessarily lie entirely on the local machine, so what is the use of specifying dest in the command.</p>
  
  <p>When I run the command via command lie and then later do hadoop dfs -ls I can see my file getting listed in the hdfs but when I create the file pro-grammatically  using </p>
  
  <pre><code>FileSystem fs      = FileSystem.get(conf);
  Path filenamePath  = new Path("hello.txt");
  fs.create(filenamePath);
  </code></pre>
  
  <p>and then later do hadoop dfs -ls I can't find this file.</p>
  
  <p>In my core-site.xml I have the following...</p>
  
  <pre><code>&lt;!-- In: conf/core-site.xml --&gt;
  &lt;property&gt;
    &lt;name&gt;hadoop.tmp.dir&lt;/name&gt;
    &lt;value&gt;/home/apurv/hadoop/hdfs&lt;/value&gt;
    &lt;description&gt;A base for other temporary directories.&lt;/description&gt;
  &lt;/property&gt;
  
  &lt;property&gt;
    &lt;name&gt;fs.default.name&lt;/name&gt;
    &lt;value&gt;hdfs://localhost:54310&lt;/value&gt;
    &lt;description&gt;The name of the default file system.  A URI whose
    scheme and authority determine the FileSystem implementation.  The
    uri's scheme determines the config property (fs.SCHEME.impl) naming
    the FileSystem implementation class.  The uri's authority is used to
    determine the host, port, etc. for a filesystem.&lt;/description&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>Intuitively also it does not make sense to me where does the copied file reside, as it might be large enough to reside on a single machine.</p>