Helpful Hadoop Shell Commands

Last updated on May 22,2019 22.8K Views

Helpful Hadoop Shell Commands

edureka.co

HDFS stands for ‘Hadoop Distributed File System’. The HDFS is a sub-project of the Apache Hadoop project. This Apache Software Foundation project is designed to provide a fault-tolerant file system designed to run on commodity hardware. HDFS is accessed through a set of shell commands which will be discussed in this post.

A short note before starting: All the Hadoop Shell commands are invoked by the bin/hadoop script.

User Commands:

Usage: hadoop fsck – /

Usage: Hadoop version

FS Shell Commands:

The Hadoop fs command runs a generic filesystem user client that interacts with the MapR filesystem (MapR-FS).

Usage: hadoop fs -ls hdfs :/

Usage: hadoop fs -df hdfs :/

Usage: hadoop fs -count hdfs :/

Usage: -mv <src> <dst>

Usage: -cp <src> <dst>

Usage: -rm <path>

Usage: -put <localsrc> … <dst>

Usage: -copyFromLocal <localsrc> … <dst>

Usage: -cat <src>

Administration Commands:

Usage: hadoop namenode -format

Usage: hadoop secondrynamenode

Usage: hadoop namenode

Usage: hadoop datanode

Usage: hadoop balancer

Usage: hadoop jobtracker

Usage: hadoop tasktracker

Got a question for us? Please mention them in the comments section and we will get back to you.

Related Posts:

Get started with Big Data and Hadoop

Hadoop Cluster Configuration Files

Operators in Apache Pig

BROWSE COURSES