In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Hadoop common operation commands list directory list [root@centos67 ~] # hdfs dfs-ls / recursively list directory list [root@centos67 ~] # hdfs dfs-lsr / create directory [root@centos67 ~] # hdfs dfs-mkdir / input/test delete directory [root@centos67 ~] # hdfs dfs-rmr / input/test creation file [root@centos67 ~] # hdfs dfs-touchz / input/test/test.txt file rename [root@centos67 ~] # hdfs Dfs-mv / input/test/test.txt / input/test/test.exe upload file [root@centos67 ~] # hdfs dfs-put. / test.log / input/test/ download file [root@centos67 ~] # hdfs dfs-get / input/test/test.log. / View file contents [root@centos67 ~] # hdfs dfs-cat / input/test/test.log delete file [root@centos67 ~] # hdfs dfs-rm / input/test/test.log copy File [root@centos67 ~] # hdfs dfs-cp / input/test/test.log / test.log Statistics directory all file sizes [root@centos67 ~] # hdfs dfs-du / input Statistics entire directory size [root@centos67 ~] # hdfs dfs-dus / input saves all file contents under the specified directory as one file And download to the local [root@centos67 ~] # hdfs dfs-getmerge / input/test. / test.txt to view the last 1KB content of the file [root@centos67 ~] # hdfs dfs / input/test/test.log modify the file belongs to the master group, you can add-R recursive [root@centos67 ~] # hdfs dfs-chown xiaomo:xiaomo / input/test/test.log to modify file permissions. You can add-R recursive [root@centos67 ~] # hdfs dfs-chmod 700 / input/test/test.log to calculate the current file / directory information directory number, file number, file size, file name / directory name [root@centos67 ~] # hdfs dfs-count / input/test/test.log to empty the Recycle Bin. When the file is deleted It will first be moved to the temporary directory .Trash /, and when the delay time has elapsed, the file will be permanently deleted. [root@centos67 ~] # hdfs dfs-expunge [root@centos67 ~] # hdfs dfs-test / input checks / input as follows:-e exists, if it exists, returns 0, otherwise returns whether 1-z is empty, if the length is 0, returns 0, otherwise returns whether 1-d is a directory, if it is a directory Return 0, otherwise return 1 to display the contents of the file. The compressed file will be decompressed [root@centos67 ~] # hdfs dfs-text / input/test/test.log to view the help of a command [root@centos67 ~] # hdfs dfs-help ls [root@centos67 ~] # hdfs dfs-help touchz to kill the running hadoop job [root@centos67 ~] # hdfs job- kill [job-id]
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.