HDFS shell命令
hdfs --help 使用该命令查询hdfs命令帮助用法
hdfs dfs 与hadoop fs 命令对等,推荐使用hdfs
hdfs dfs -usage cp 查看命令用法
hdfs dfs -cat /path/txt
hdfs dfs -ls /path
hdfs dfs -rm [-r] /path
hdfs dfs -copyFromLocal /txt /user/txt local ---> hdfs /user/txt
hdfs dfs -put /fromlocal /toHdfs
hdfs dfs -copyToLocal /txt /user/txt hdfs ---> local /txt
hdfs dfs -get /fromhdfs /toLocal
hdfs dfs -text /tmp/index.html.gz | more 查看压缩的文件内容
hdfs dfs -du -h /tmp/tl 查看文件站hdfs的磁盘大小
hdfs dfs -touchz /tmp/txt 创建文本文档
hdfs dfs -cp /from /to 复制
hdfs dfs -mv /from /to
hdfs dfsadmin -report 查看集群状态
hdfs dfsadmin -help
hdfs dfsadmin -safemode get 获得安全模式信息