47
简单介绍常用hadoop dfs命令
source link: https://www.linuxprobe.com/hadoop-dfs-cmand.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
创建目录
hadoop dfs -mkdir /home
上传文件或目录到hdfs
hadoop dfs -put hello / hadoop dfs -put hellodir/
查看目录
hadoop dfs -ls /
创建一个空文件
hadoop dfs -touchz /361way
删除一个文件
hadoop dfs -rm /361way
删除一个目录
hadoop dfs -rmr /home
重命名
hadoop dfs -mv /hello1 /hello2
查看文件
hadoop dfs -cat /hello
将制定目录下的所有内容merge成一个文件,下载到本地
hadoop dfs -getmerge /hellodir wa
使用du文件和目录大小
hadoop dfs -du /
将目录拷贝到本地
hadoop dfs -copyToLocal /home localdir
查看dfs的情况
hadoop dfsadmin -report
查看正在跑的Java程序
jps
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK