Saturday, 2 January 2016

Hadoop: moveFromLocal: move file from local system to HDFS

“moveFromLocal” command move file from local system to HDFS.

Usage:
hadoop fs [generic options] -moveFromLocal <localsrc> ... <dst>
 
Example
hadoop fs -moveFromLocal /home/cloudera/Desktop/atlasClient.docx /user/cloudera/dir1
 
Above snippet move the file 'atlasClient.docx' from /home/cloudera/Desktop/ to the HDFS folder /user/cloudera/dir1.

$ls /home/cloudera/Desktop/
atlasClient.docx  Eclipse.desktop  Enterprise.desktop  Express.desktop  Kerberos.desktop  Parcels.desktop  SharedData
$
$
$hadoop fs -moveFromLocal /home/cloudera/Desktop/atlasClient.docx /user/cloudera/dir1
$
$ls /home/cloudera/Desktop/
Eclipse.desktop  Enterprise.desktop  Express.desktop  Kerberos.desktop  Parcels.desktop  SharedData
$




Previous                                                 Next                                                 Home

No comments:

Post a Comment