0% found this document useful (0 votes)
20 views5 pages

Practical 8

The document outlines various Hadoop commands used for managing files in the Hadoop Distributed File System (HDFS). It includes descriptions and usage examples for commands such as version, mkdir, ls, put, copyFromLocal, get, copyToLocal, cat, mv, and cp. These commands facilitate the storage, retrieval, and manipulation of large datasets across clustered computers.

Uploaded by

21040452
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views5 pages

Practical 8

The document outlines various Hadoop commands used for managing files in the Hadoop Distributed File System (HDFS). It includes descriptions and usage examples for commands such as version, mkdir, ls, put, copyFromLocal, get, copyToLocal, cat, mv, and cp. These commands facilitate the storage, retrieval, and manipulation of large datasets across clustered computers.

Uploaded by

21040452
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Experiment No.

Title: Working with HADOOP commands

Apache Hadoop is an open source framework that is used to efficiently store and process
large datasets ranging in size from gigabytes to petabytes of data. Instead of using one large
computer to store and process the data, Hadoop allows clustering multiple computers to
analyze massive datasets in parallel more quickly.

1. Version

Hadoop HDFS version Command Usage:


The Hadoop fs shell command version prints the Hadoop version

Hadoop HDFS version Command Description:


The Hadoop fs shell command version prints the Hadoop version.

2. mkdir

Hadoop HDFS mkdir Command Usage:


Hadoop HDFS mkdir Command Description:
This command creates the directory in HDFS if it does not already exist.

3. ls

Hadoop HDFS ls Command Usage:


Here in the below example, we are using the ls command to enlist the files and directories
present in HDFS.

4. put

Hadoop HDFS put Command Usage:


Here in this example, we are trying to copy localfile1 of the local file system to the Hadoop
filesystem.
Hadoop HDFS put Command Description:
The Hadoop fs shell command put is similar to the copyFromLocal, which copies files or
directory from the local filesystem to the destination in the Hadoop filesystem.

5. copyFromLocal

Hadoop HDFS copyFromLocal Command Usage:


Here in the below example, we are trying to copy the ‘test1’ file present in the local file
system to the newDataFlair directory of Hadoop.

Hadoop HDFS copyFromLocal Command Example:


Here in the below example, we are trying to copy the ‘test1’ file present in the local file
system to the newDataFlair directory of Hadoop.

6. get

Hadoop HDFS get Command Usage:


In this example, we are trying to copy the ‘file’ of the hadoop filesystem to the local file
system.
Hadoop HDFS get Command Description:
The Hadoop fs shell command get copies the file or directory from the Hadoop file system to
the local file system.

7. copyToLocal

Hadoop HDFS copyToLocal Command Usage:


Here in this example, we are trying to copy the ‘sample’ file present in the newDataFlair
directory of HDFS to the local file system.

Hadoop HDFS copyToLocal Description:


copyToLocal command copies the file from HDFS to the local file system.

8. cat

Hadoop HDFS cat Command Usage:

Here in this example, we are using the cat command to display the content of the ‘sample’
file present in newDataFlair directory of HDFS.
Hadoop HDFS cat Command Description:
The cat command reads the file in HDFS and displays the content of the file on console or
stdout.

9. mv

Hadoop HDFS mv Command Description:

The HDFS mv command moves the files or directories from the source to a destination
within HDFS.

10. cp

Hadoop HDFS cp Command Description:

The cp command copies a file from one directory to another directory within the HDFS.

You might also like