HDFS Commands
HDFS Commands
HDFS Commands
HDFS is the primary or major component of the Hadoop ecosystem which is responsible for
storing large data sets of structured or unstructured data across various nodes and thereby
maintaining the metadata in the form of log files. To use the HDFS commands, first we need
to start the Hadoop services using the following command:
sbin/start-all.sh
Hadoop HDFS Commands
With the help of the HDFS command, we can perform Hadoop HDFS file operations like
changing the file permissions, viewing the file contents, creating files or directories, copying
file/directory from the local file system to HDFS or vice-versa, etc.
Before starting with the HDFS command, we have to start the Hadoop services. To start the
Hadoop services do the following:
1. Move to the ~/hadoop-3.1.2 directory
2. Start Hadoop service by using the command
sbin/start-dfs.sh
In this Hadoop Commands tutorial, we have mentioned the top 10 Hadoop HDFS commands
with their usage, examples, and description.
Let us now start with the HDFS commands.
1. version
Hadoop HDFS version Command Usage:
version
Hadoop HDFS version Command Example:
Before working with HDFS you need to Deploy Hadoop, follow this guide to Install and
configure Hadoop 3.
hadoop version
Example 2:
We can cross-check whether the file is copied or not using the ls command.