Big Data Hadoop

his blog post we are going to learn commands to shift local file to HDFS.

Lets go through this video to understand the whole process

 

Commands for putting a local file in HDFS

Local to HDFS  
hadoop fs -put /home/ubuntu/abc.txt /user/codewithz Copies the file from local system to HDFS in this instance it copies the file abc.txt from /home/ubuntu to /user/codewithz in HDFS
hadoop fs -put -f /home/ubuntu/abc.txt /user/codewithz Copies the file from local system to HDFS in this instance it copies the file abc.txt from /home/ubuntu to /user/codewithz in HDFS, using -f option with put command will overwrite the file if it already exist
hadoop fs -put -p /home/ubuntu/abc.txt /user/codewithz Copies the file from local system to HDFS in this instance it copies the file abc.txt from /home/ubuntu to /user/codewithz in HDFS -p preserves access and modification times, ownership and the mode.

 

Related Posts

Table Of Contents

;