Hadoop shell
1. View help
Hadoop fs-help
2. Upload
Hadoop fs-put
Such as hadoop fs-put test.log /
3. View the contents of the file
Hadoop fs-cat
For example: hadoop fs-cat / test.log
4. View the list of files
Hadoop fs-ls /
5. Download the file
Hadoop fs-get
6. Create a directory: hadoop fs-mkdir
Such as hadoop fs-mkdir / myDir
7. Delete the file: hadoop fs-rm-r
8. Execute jar: such as the wordcount program that comes with hadoop.
Hadoop jar hadoop-mapreduce-examples-2.4.1.jar wordcount/ wordcount/in / wordcount/out
The execution result is as follows: