Hadoop DFS Common command line

Source: Internet
Author: User
Keywords DFS view all upload run

* File operation

* View Catalog Files

* $ Hadoop DFS-LS/USER/CL

*

* Create a file directory

* $ Hadoop dfs-mkdir/user/cl/temp

*

* http://www.aliyun.com/zixun/aggregation/18137.html > Delete files

* $ Hadoop dfs-rm/user/cl/temp/a.txt

*

* Delete all files in directory and directory

* $ Hadoop dfs-rmr/user/cl/temp

*

* Upload File

* Upload a native/home/cl/local.txt to HDFs/user/cl/temp directory

* $ Hadoop dfs-put/home/cl/local.txt/user/cl/temp

*

* Download files

* Download hdfs.txt files from/user/cl/temp directory in HDFs to native/home/cl/

* $ Hadoop DFS-GET/USER/CL/TEMP/HDFS.TXT/HOME/CL

*

* View Files

* $ Hadoop dfs–cat/home/cl/hdfs.txt

*

* Job operation

* Submit MapReduce job, Hadoop all MapReduce job is a jar package

* $ Hadoop jar <local-jar-file> <java-class> <hdfs-input-file> <hdfs-output-dir>

* $ Hadoop jar Sandbox-mapred-0.0.20.jar Sandbox.mapred.wordcountjob/user/cl/input.dat/user/cl/outputdir

*

* Kill a running job

* Assuming job_id is: job_201207121738_0001

* $ Hadoop Job-kill job_201207121738_0001

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.