Common shell commands for Hadoop

Source: Internet
Author: User
Tags hdfs dfs hadoop fs

A. Common Hadoop commands

1. The FS command for Hadoop

#查看hadoop所有的fs命令

Hadoop FS

#上传文件 (both put and copyfromlocal are upload commands)

Hadoop fs-put jdk-7u55-linux-i586.tar.gz hdfs://hucc01:9000/jdkhadoop fs-copyfromlocal jdk-7u55-linux-i586.tar.gz Hdfs://hucc01:9000/jdk

#下载命令 (both get and copytolocal are download commands)

Hadoop fs-get hdfs://hucc01:9000/jdk jdk1.7hadoop fs-copytolocal hdfs://hucc01:9000/jdk jdk1.7

#将本地一个或者多个文件追加到hdfs文件中 (Appendtofile)

Hadoop fs-appendtofile Install.log/words

#查询hdfs的所有文件 (LS)

Hadoop Fs-ls/

#帮助命令 (Help)

Hadoop Fs-help FS

#查看hdfs文件的内容 (Cat and text)

Hadoop Fs-cat/wordshadoop Fs-text/words

#删除hdfs文件 (RM)

Hadoop fs-rm-r/words

#统计hdfs文件和文件夹的数量 (count)

Hadoop fs-count-r/

#合并hdfs某个文件夹的文件, and download to local (getmerge)

Hadoop Fs-getmerge/merge

#将本地文件剪切到hdfs, which is equivalent to uploading a local file and then deleting it (moveformlocal)

Hadoop fs-movefromlocal Words/

#查看当前文件系统的使用状态 (DF)

Hadoop FS-DF


Second, the commonly used HDFs command (this is used more)

Use the HDFs command, like the Hadoop command, after 2.0 recommendation

HDFs DFS

Iii. Summary

Nothing to learn, very easy, these commands are basically the same as the Linux command, as for some of the details of the use of the Help command on the line.

Refer to Hadoop-shell.pdf for details

This article is from the "Mo" blog, please be sure to keep this source http://flycc258.blog.51cto.com/8624126/1615121

Common shell commands for Hadoop

Related Article

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.