hadoop的常用命令
hadoop fs -help –查看帮助
hadoop fs -put /mydir/dept.txt hdfs://hadoop-master:9000/mytable/test/ —把数据文件上传到hadoop
hadoop fs -mkdir hdfs://hadoop-master:9000/mytable/test —创建目录下的文件夹
hadoop fs -mkdir -p hdfs://hadoop-master:9000/mytable2/test —创建目录下的文件夹,-p 创建全部的文件夹
hadoop fs -rm -r -f hdfs://hadoop-master:9000/mytable/test —-删除非空目录
hadoop fs -rm -f hdfs://hadoop-master:9000/mytable/test/dept1.txt —删除目录下的文件
hadoop fs -cat hdfs://hadoop-master:9000/mytable/test/dept1.txt —查看目录下的 文件
hadoop fs -put /mydir/dept.txt hdfs://hadoop-master:9000/mytable/test/ —把数据文件上传到hadoop
hadoop fs -get hdfs://hadoop-master:9000/mytable/fz_dept_test/dept.txt /mydir/dept_get.txt —把数据文件上传到hadoop
hadoop fs -rmdir hdfs://hadoop-master:9000/mytable/test —删除目录下的文件夹(空目录)
更多可以看:https://blog.51cto.com/StarBigData/5164015?b=totalstatistic
https://blog.csdn.net/weixin_44441131/article/details/116657184