UrbanPro
true

Learn Big Data from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

HDFS Commands - Data Engineering

Ram Kumar
10/06/2022 0 0

HDFS commands :

HDFS commands will interact with namenode to show results
some commands like cat ,tail will interact with datanode to show results

HDFS help commands:

hadoop fs -help ls

list commands :

hadoop fs -ls /user/cloudera
hadoop fs -ls / [Sort by name]
hadoop fs -ls -t -r [sort by time in reverse order]
hadoop fs -ls -S / [sort by size by default largest is the top]
hadoop fs -ls -S -h / [ sort by size by readable format]
hadoop fs -ls -R [ list recursively]
hadoop fs -mkdir /user/cloudera/testingg
hadoop fs -mkdir -p /user/cloudera/testing1/testing2

Removing files & directories:

hadoop fs -rm /user/cloudera/testingg
hadoop fs -rm -R /user/cloudera/testingg
hadoop fs -rmdir /user/cloudera/testingg

Copying file from Local to HDFS Location:

hadoop fs -copyFromLocal desktop/file1.txt /datanode
hadoop fs - copyToLocal /datanode desktop/file.txt

hadoop fs -get desktop/file1.txt /datanode
hadoop fs -put /datanode desktop/file.txt

Reading the files :

hadoop fs -tail /user/cloudera/file1.txt
hadoop fs -cat /user/cloudera/file1.txt
hadoop fs -cp /user/cloudera/file1.txt /user/cloudera/folder2/file1.txt
hadoop fs -mv /user/cloudera/file1.txt /user/cloudera/folder2/file1.txt

File System & disk space usage:

hadoop fs -df -h /user/cloudera
hadoop fs -du -h /user/cloudera
dfs.replication=5

0 Dislike
Follow 1

Please Enter a comment

Submit

Other Lessons for You

Microsoft Word
Microsoft Word is a widely used commercial word processor designed by Microsoft. Microsoft Word is a component of the Microsoft Office suite of productivity software, but can also be purchased as a stand-alone...

What is Microsoft Access?
Microsoft Access has been around for some time, yet people often still ask me what is Microsoft Access and what does it do? Microsoft Access is a part of the Microsoft Office Suite. It does not come with...

What is the difference between Analytics and analysis?
Analysis> Separation of a whole into its component parts> Looks backwards over time, providing marketers with a historical view of what has happened Analytics > Defines the science behind the...

How to create UDF (User Defined Function) in Hive
1. User Defined Function (UDF) in Hive using Java. 2. Download hive-0.4.1.jar and add it to lib-> Buil Path -> Add jar to libraries 3. Q:Find the Cube of number passed: import org.apache.hadoop.hive.ql.exec.UDF; public...
S

Sachin Patil

0 0
0

What is Hyperion?
- Its an Business Intelligence tools. Like Brio which was an independent product bought over my Hyperion has converted this product name to Hyperion Intelligence. Is it an OLAP tool? - Yes. You can analyse...
X

Looking for Big Data Classes?

The best tutors for Big Data Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Big Data with the Best Tutors

The best Tutors for Big Data Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more