hadoop fs 其实和hdfs dfs命令的区别:
-
hadoop fs:
FS relates to a generic file system which can point to any file systems like local, HDFS etc. So this can be used when you are dealing with different file systems such as Local FS, HFTP FS, S3 FS, and others
意思是说该命令可以用于其他文件系统,不止是hdfs文件系统内,也就是说该命令的使用范围更广 -
hadoop dfs
专门针对hdfs分布式文件系统 -
hdfs dfs
和上面的命令作用相同,相比于上面的命令更为推荐,并且当使用hadoop dfs时内部会被转为hdfs dfs命令
使用时可以随时查看帮助 hadoop fs -help [命令如put、mkdir等]
$>hadoop fs -mkdir -p /usr/wangcong/hadoop/
$>hadoop fs -put /mnt/hgfs/myShare/helloworld.txt /usr/wangcong/hadoop/
$>hadoop fs -get /usr/wangcong/hadoop/helloworld.txt ~/a.txt
里面的命令参数都需要分开如常用的rm -rf 需要写成 -rm -r -f
1032

被折叠的 条评论
为什么被折叠?



