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

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 Are Olap, Molap, Rolap, Dolap, Holap?
1. OLAP: On-Line Analytical Processing: Designates a category of applications and technologies that allow the collection, storage, manipulation and reproduction of multidimensional data, with the goal...

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...

Loading Hive tables as a parquet File
Hive tables are very important when it comes to Hadoop and Spark as both can integrate and process the tables in Hive. Let's see how we can create a hive table that internally stores the records in it...

Chart
A chart is a set of coordinates When you make a chart you start with an empty, two-dimensional space, a vertical dimension (y) and a horizontal dimension (x) . You also have a data source. Your job is...
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