1、上传文件
hadoop fs -put test.txt /
hadoop fs -copyFromLocal test.txt /test.txt.2
2、下载文件
hadoop fs -get /test.txt.2
hadoop fs -copyToLocal /test.txt.2
3、创建目录
hadoop fs -mkdir /aaa
hadoop fs -mkdir -p /bbb/xxx
4、删除目录
hadoop fs -rm -r /aaa
5、移动/重命名
hadoop fs -mv /test.txt.2 /test.txt.3
hadoop fs -mv /test.txt.3 /bbb/test.txt.4
6、拷贝文件
hadoop fs -cp /test.txt /bbb/
7、查看目录下的子文件夹和文件
hadoop fs -ls /bbb/xxx/
hadoop fs -ls -R / ##递归显示指定路径下的所有文件和文件夹信息
8、查看《文本》文件内容
hadoop fs -cat /test.txt
hadoop fs -tail /test.txt
9、下载多个文件在本地生成一个合并文件
hadoop fs -getmerge /test/*.dat ./xx.dat