[xiaoqiu@s150 bin]$ hdfs dfs
Usage: hadoop fs [generic options]
fs run a generic filesystem user client
[xiaoqiu@s150 bin]$ cd ~
[xiaoqiu@s150 ~]$ ls
[xiaoqiu@s150 ~]$ hdfs dfs -mkdir -p ~/cr
[xiaoqiu@s150 ~]$ touch test.txt
[xiaoqiu@s150 ~]$ ls
test.txt
[xiaoqiu@s150 ~]$
[xiaoqiu@s150 ~]$ hdfs dfs -put test.txt ~/cr
[xiaoqiu@s150 ~]$ hdfs dfs -ls ~/cr
Found 1 items
-rw-r--r-- 2 xiaoqiu supergroup 0 2017-12-24 08:08 /home/xiaoqiu/cr/test.txt
[xiaoqiu@s150 ~]$
[xiaoqiu@s150 ~]$ hdfs dfs -get ~/cr/test.txt a.txt
[xiaoqiu@s150 ~]$ ls
a.txt test.txt
[xiaoqiu@s150 ~]$
[xiaoqiu@s150 ~]$ hdfs dfs -ls -R ~/cr/
[xiaoqiu@s150 ~]$
[xiaoqiu@s150 ~]$ hdfs dfs -appendToFile b.txt ~/cr/test.txt
[xiaoqiu@s150 ~]$ hdfs dfs -lsr ~
lsr: DEPRECATED: Please use 'ls -R' instead.
drwxr-xr-x - xiaoqiu supergroup 0 2017-12-24 08:40 /home/xiaoqiu/cr
-rw-r--r-- 2 xiaoqiu supergroup 6 2017-12-24 08:40 /home/xiaoqiu/cr/test.txt
-rw-r--r-- 2 xiaoqiu supergroup 6 2017-12-24 08:39 /home/xiaoqiu/cr.test.txt
[xiaoqiu@s150 ~]$ hdfs dfs -cat ~/cr/test.txt
hello
[xiaoqiu@s150 ~]$
欢迎关注我的公众号:小秋的博客
CSDN博客:https://blog.csdn.net/xiaoqiu_cr
github:https://github.com/crr121
联系邮箱:rongchen633@gmail.com
有什么问题可以给我留言噢~