1. hdfs dfs -ls
hadoop fs? -ls <path>? #查看hdfs下一級目錄
2.hdfs dfs -mkdir
hadoop fs?-mkdir <path>? ?#創(chuàng)建目錄
3.hdfs dfs -chown? #修改用戶、用戶組
4.hdfs dfs -chmod? #賦予權(quán)限
hdfs dfs -chmod -R 777 aaa
l練習(xí)一
5.hdfs dfs -put?
hadoop fs? -put <src> <des>? #從linux上傳文件到hdfs
hdfs dfs -put 1.log /aaa
6.hdfs dfs -get
hadoop fs? -get <src> <des>? ?#從hdfs下載文件到linux
hdfs dfs -get 1.log /aaa
7.hdfs dfs -mv? #移動(dòng)
hdfs dfs -mv 1.log /.Trash
8.hadoop fs ?-rm <path>? #刪除文件
hdfs dfs -rm /1.log
練習(xí)二
練習(xí)二:
hdfs dfs -ls? #查看文件
hdfs dfs -put 1.log? #將1.log文件從Linux上傳到hdfs
hdfs dfs -ls
hdfs dfs -mv 1.log 11.log? #移動(dòng)1.log并改名為11.log
hdfs dfs -ls
hdfs dfs -get 11.log /tmp? #將11.log文件從hdfs下載到Linux
ll /tmp?
hdfs dfs -rm 11.log
hdfs dfs -ls
刪除