2019-12-23
BigData 大数据培训 好程序员
1.列出根目录下所有的目录或文件
hadoopfs-ls/
2.列出/logs目录下的所有目录和文件
hadoopfs-ls/logs
3.列出/user目录及其子目录下的所有文件(谨慎使用)
hadoopfs-ls-R/user
4.创建/soft目录
hadoopfs-mkdir/soft
5.创建多级目录
hadoopfs-mkdir-p/apps/windows/2017/01/01
6.将本地的wordcount.jar文件上传到/wordcount目录下
hadoopfs-putwordcount.jar/wordcount
7.将/stu/students.txt文件拷贝到本地
hadoopfs-copyToLocal/stu/students.txt
8.将word.txt文件拷贝到/wordcount/input/目录
hadoopfs-copyFromLocalword.txt/wordcount/input
9.将word.txt文件从本地移动到/wordcount/input/目录下
hadoopfs-moveFromLocalword.txt/wordcount/input/
10.将/stu/students.txt拷贝一份为/stu/students.txt.bak
hadoopfs-cp/stu/students.txt/stu/students.txt.bak
11.将/flume/tailout/目录下的子目录或文件都拷贝到/logs目录(如果此目录不存在会创建)下
hadoopfs-cp/flume/tailout//logs
12.将/word.txt文件重命名为/words.txt
hadoopfs-mv/word.txt/words.txt
13.将/words.txt文件移动到/wordcount/input/目录下
hadoopfs-mv/words.txt/wordcount/input/
14.将/ws目录以及子目录和文件都删除(谨慎使用)
hadoopfs-rm-r/ws
15.将/wordcount/output2/目录下的a.txt文件删除
hadoopfs-rm/wordcount/output2/a.txt
16.将/wordcount/input/目录下面的所有文件都删除
hadoopfs-rm/wordcount/input/*
17.查看HDFS集群的磁盘空间使用情况
hadoopfs-df-h
18.查看/word.txt文件的内容
hadoopfs-cat/word.txt
19.将name.txt文件中的内容添加到/wordcount/input/words.txt文件中
hadoopfs-appendToFilename.txt/wordcount/words.txt
20.动态查看/wordcount/input/words.txt文件的内容
hadoopfs-tail-f/wordcount/words.txt
21.统计/flume目录总大小
hadoopfs-du-s-h/flume
22.分别统计/flume目录下各个子目录(或文件)大小
hadoopfs-du-s-h/flume/*
开班时间:2021-04-12(深圳)
开班盛况开班时间:2021-05-17(北京)
开班盛况开班时间:2021-03-22(杭州)
开班盛况开班时间:2021-04-26(北京)
开班盛况开班时间:2021-05-10(北京)
开班盛况开班时间:2021-02-22(北京)
开班盛况开班时间:2021-07-12(北京)
预约报名开班时间:2020-09-21(上海)
开班盛况开班时间:2021-07-12(北京)
预约报名开班时间:2019-07-22(北京)
开班盛况Copyright 2011-2023 北京千锋互联科技有限公司 .All Right 京ICP备12003911号-5 京公网安备 11010802035720号