HDFS基本命令行操作

1.基本命令


  • 查看某一路径下的所有文件:​​hdfs dfs -ls [filePath]​
  • 上传文件:​​hdfs dfs -put [local filePath] [hdfs filePath]​
  • 下载文件:​​hdfs dfs -get [hdfs filePath] [local filePath]​
  • 删除文件:​​hdfs dfs -rm -r [hdfs filePath]​
  • 查看某一文件内容:​​hdfs dfs -cat [filePath]​