How shell operates on hdfs
Editor to share with you how to operate shell on hdfs, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Shell operation of hadoop
1. Hadoop fs-ls / View the contents of the hadoop root directory
2. Hadoop fs-lsr / Recursively view the contents of the hadoop directory
3. Hadoop fs-mkdir / abc create an abc directory under the hadoop directory
4. Hadoop fs-put / root/Desktop/install.log / abc uploads the install.log file from the / root/Desktop directory in the linux system to the abc directory under the hadoop root directory
5. Hadoop fs-get / abc/install.log / root/Desktop downloads the install.log under the abc directory under the root directory of hadoop to / root/Desktop
6. Hadoop fs-rm / abc/install.log delete the install.log file
7. Hadoop fs-rmr / abc delete the abc directory (delete files can use hadoop fs-rm, delete folders can only use hadoop fs-rmr / abc and delete files in this folder)
8. When hadoop fs-put / root/Desktop/install.log / abc uses this command to upload a file, when the abc directory does not exist, after executing the command, abc becomes a file and the file abc is the uploaded install.log
9. Hadoop fs-text / abc/install.log View install.log
The above is all the content of this article "how to operate shell to hdfs". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!