O'Reilly logo

Learning Hadoop 2 by Garry Turkington, Gabriele Modena

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Command-line access to the HDFS filesystem

Within the Hadoop distribution, there is a command-line utility called hdfs, which is the primary way to interact with the filesystem from the command line. Run this without any arguments to see the various subcommands available. There are many, though; several are used to do things like starting or stopping various HDFS components. The general form of the hdfs command is:

hdfs <sub-command> <command> [arguments]

The two main subcommands we will use in this book are:

  • dfs: This is used for general filesystem access and manipulation, including reading/writing and accessing files and directories
  • dfsadmin: This is used for administration and maintenance of the filesystem. We will not cover this command in detail, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required