In this blog post I will explain different HDFS commands to access HDFS which are commonly used while working as a Big Data Developer Training.

LS
Similar to Unix command, it is used for creating directories in HDFS

[npntraining@localhost ~] hdfs dfs -ls /

-mkdir
[npntraining@localhost ~] hdfs dfs -mkdir /dir01

– put
Copies files from local file system to HDFS. This is similar to -copyFromLocal command.

[npntraining@localhost ~] hdfs dfs sample.txt /dir01

Note :

Passing -f overwrites the destination if it already exists.
Passing -p preserves access and modification times, ownership and the mode.

The rest of this post has been migrated here.

--

--

Naveen - (Founder & Trainer @ NPN Training)
Naveen - (Founder & Trainer @ NPN Training)

Written by Naveen - (Founder & Trainer @ NPN Training)

A software training institute which believes that technology has to be learnt under experienced practitioners — www.npntraining.com

No responses yet