A common command to hdfs the Linux system operation of Hadoop

Source: Internet
Author: User
Tags hadoop fs
1. In the general operation of Linux has LS mikdir rmdir VI operation
The general operating syntax for Hadoop HDFs is to view Hadoop and directory files for Hadoop fs-ls//** **/
Hadoop FS-LSR//*** recursively view the file directory of Hadoop **/
The Hadoop fs-mkdir/dl/** represents the creation of a D1 folder under the root directory of HDFs **/e
Hadoop HDFs generally create file operations rarely, upload more in Linux
The syntax is:
Hadoop fs-put Linux file path (also the path to upload file) space Hadoop's HDFs path
For example, put Linux under the root of the Install.log file uploaded under the D1 directory of Hadoop HDFs
Command Action Bit
Hadoop fs-put/root/install.log/d1
Note When uploading files:
When you upload files to the HDFs file directory of Hadoop, HDFs will change the file name you uploaded to the file.
The name of the folder T
HDFs upload file If there will be prompt, you can upload the file name
Download operation is to replace-put-get, source file path, destination path, at this time the original file for HDFs, the destination
is Linux, grammar and-put, but the original text and destination interchange I1

HDFs View File Syntax
Hadoop FS-TEXT/D1/ADC This statement means to view the ABC files under the D1 folder in the HDFs root directory


HDFs Delete Files
Hadoop FS-RM/D1/ADC This statement means to delete the ABC file under the D1 folder in the HDFs root directory


HDFs Delete Folder
Hadoop fs-rmr/d1 The meaning of this statement is to delete all files under the D1 folder in the HDFs root directory

HDFs Help Document
Hadoop FS
Hadoop fs-help Command

Note that the Hadoop fs-ls does not answer the path, and if there is a default path/user/root root refers to the current user
There won't be an error.

A complete formulation
Hadoop fs-ls hdfs://Host Name: Port number





Namenode
Namenode storage information in the source code hdfs-default.xml inside a detailed description, the copy of the Core-site.xml
The value/dfs/name/current/fsimage designation of <name>hadoop.tmp.dir</name>
Namenode stored in Linux path


Datanode
Datanode storage information in the source code hdfs-default.xml inside a detailed description, the copy of the Core-site.xml
The VALUE/DFS/DATA/CURRENTSSSS designation of <name>hadoop.tmp.dir</name>
Datanode stored in Linux path

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.