In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Good programmer big data tutorials share summary of HadoopHDFS operation commands
1. List all directories or files under the root directory
Hadoopfs-ls/
two。 List all directories and files under the / logs directory
Hadoopfs-ls/logs
3. List all files in the / user directory and its subdirectories (use with caution)
Hadoopfs-ls-R/user
4. Create / soft directory
Hadoopfs-mkdir/soft
5. Create a multi-level directory
Hadoopfs-mkdir-p/apps/windows/2017/01/01
6. Upload the local wordcount.jar file to the / wordcount directory
Hadoopfs-putwordcount.jar/wordcount
7. Copy the / stu/students.txt file locally
Hadoopfs-copyToLocal/stu/students.txt
8. Copy the word.txt file to the / wordcount/input/ directory
Hadoopfs-copyFromLocalword.txt/wordcount/input
9. Move the word.txt file locally to the / wordcount/input/ directory
Hadoopfs-moveFromLocalword.txt/wordcount/input/
10. Make a copy of / stu/students.txt as / stu/students.txt.bak
Hadoopfs-cp/stu/students.txt/stu/students.txt.bak
11. Copy the subdirectories or files under the / flume/tailout/ directory to the / logs directory (if this directory does not exist, it will be created)
Hadoopfs-cp/flume/tailout//logs
twelve。 Rename the / word.txt file to / words.txt
Hadoopfs-mv/word.txt/words.txt
13. Move the / words.txt file to / wordcount/input/ directory
Hadoopfs-mv/words.txt/wordcount/input/
14. Delete the / ws directory as well as subdirectories and files (use with caution)
Hadoopfs-rm-r/ws
15. Delete the a.txt file in the / wordcount/output2/ directory
Hadoopfs-rm/wordcount/output2/a.txt
16. Delete all files under the / wordcount/input/ directory
Hadoopfs-rm/wordcount/input/*
17. View the disk space usage of the HDFS cluster
Hadoopfs-df-h
18. View the contents of the / word.txt file
Hadoopfs-cat/word.txt
19. Add the contents of the name.txt file to the / wordcount/input/words.txt file
Hadoopfs-appendToFilename.txt/wordcount/words.txt
20. Dynamically view the contents of the / wordcount/input/words.txt file
Hadoopfs-tail-f/wordcount/words.txt
21. Total size of statistics / flume directory
Hadoopfs-du-s-h/flume
twenty-two。 Count the size of each subdirectory (or file) under the / flume directory respectively
Hadoopfs-du-s-h/flume/*
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.