码迷,mamicode.com
首页 > 其他好文 > 详细

hadoop的hdfs命令

时间:2016-07-05 19:10:22      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:hadoop命令

[root@ldy conf]# hadoop fs -ls /     ls和linux命令差不多

Warning: $HADOOP_HOME is deprecated.


Found 1 items

drwxr-xr-x   - root supergroup          0 2016-07-05 15:55 /user

[root@ldy conf]# 


[root@ldy conf]# hadoop fs -mkdir /user/root/zby   创建一个目录和linux命令差不多

Warning: $HADOOP_HOME is deprecated.


[root@ldy conf]# hadoop fs -ls /user/root/

Warning: $HADOOP_HOME is deprecated.


Found 4 items

-rw-r--r--   1 root supergroup       2052 2016-07-05 16:01 /user/root/hadoop-metrics2.properties

-rw-r--r--   1 root supergroup       2460 2016-07-05 15:55 /user/root/input

drwxr-xr-x   - root supergroup          0 2016-07-05 15:57 /user/root/input1

drwxr-xr-x   - root supergroup          0 2016-07-05 16:13 /user/root/zby

[root@ldy conf]# 



[root@ldy conf]hadoop fs -put hadoop-env.sh /user/root/   把文件上传到指定目录

Warning: $HADOOP_HOME is deprecated.


[root@ldy conf]# 


[root@ldy conf]# hadoop fs -cat /user/root/hadoop-env.sh    查看上传的文件

Warning: $HADOOP_HOME is deprecated.


# Set Hadoop-specific environment variables here.


# The only required environment variable is JAVA_HOME.  All others are

# optional.  When running a distributed configuration it is best to

# set JAVA_HOME in this file, so that it is correctly defined on



[root@ldy conf]# hadoop fs -get /user/root/hadoop-env.sh hadoop-env.sh2 下载指定文件

Warning: $HADOOP_HOME is deprecated.


[root@ldy conf]# ls hadoop-env.sh2  查看下载下来的文件

hadoop-env.sh2

[root@ldy conf]# 


hadoop的hdfs命令

标签:hadoop命令

原文地址:http://bjzby.blog.51cto.com/4084070/1796004

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!