Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Cloudera Administration Handbook

You're reading from   Cloudera Administration Handbook A complete, hands-on guide to building and maintaining large Apache Hadoop clusters using Cloudera Manager and CDH5

Arrow left icon
Product type Paperback
Published in Jul 2014
Publisher Packt
ISBN-13 9781783558964
Length 254 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Rohit Menon Rohit Menon
Author Profile Icon Rohit Menon
Rohit Menon
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Getting Started with Apache Hadoop 2. HDFS and MapReduce FREE CHAPTER 3. Cloudera's Distribution Including Apache Hadoop 4. Exploring HDFS Federation and Its High Availability 5. Using Cloudera Manager 6. Implementing Security Using Kerberos 7. Managing an Apache Hadoop Cluster 8. Cluster Monitoring Using Events and Alerts 9. Configuring Backups Index

Exploring HDFS commands

To perform filesystem related tasks, the commands begin with hdfs dfs. The filesystem commands have been designed to behave similarly to the corresponding Unix/Linux filesystem commands.

What is a URI? URI stands for Uniform Resource Identifier. In the commands that are listed as follows, you will observe the use of URI for file locations. The URI syntax to access a file in HDFS is hdfs://namenodehost/parent/child/<file>.

Commonly used HDFS commands

The following are some of the most commonly used HDFS commands:

  • ls: This command lists files in HDFS.

    The syntax of the ls command is hdfs dfs -ls <args>. The following is the screenshot showing an example of the ls command:

    Commonly used HDFS commands
  • cat: This command displays the contents of file/files in the terminal.

    The syntax of the cat command is hdfs dfs -cat URI [URI …]. The following is a sample output of the cat command:

    Commonly used HDFS commands
  • copyFromLocal: This command copies a file/files from the local filesystem to HDFS.

    The syntax of the copyFromLocal...

You have been reading a chapter from
Cloudera Administration Handbook
Published in: Jul 2014
Publisher: Packt
ISBN-13: 9781783558964
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime