hadoop常用命令
2015-11-17 15:23
513 查看
官网手册很详细
网址:http://hadoop.apache.org/docs/r1.0.4/cn/hdfs_shell.html
FS Shell
调用文件系统(FS)Shell命令应使用 bin/hadoop fs 的形式。 所有的的FS shell命令使用URI路径作为参数。URI格式是scheme://authority/path。对HDFS文件系统,scheme是hdfs,对本地文件系统,scheme是file。其中scheme和authority参数都是可选的,如果未加指定,就会使用配置中指定的默认scheme。一个HDFS文件或目录比如/parent/child可以表示成hdfs://namenode:namenodeport/parent/child,或者更简单的/parent/child(假设你配置文件中的默认值是namenode:namenodeport)。大多数FS Shell命令的行为和对应的Unix Shell命令类似,不同之处会在下面介绍各命令使用详情时指出。出错信息会输出到stderr,其他信息输出到stdout。
cat
使用方法:hadoop fs -cat URI [URI …]
将路径指定文件的内容输出到stdout。
示例:
hadoop fs -cat hdfs://host1:port1/file1 hdfs://host2:port2/file2
hadoop fs -cat file:///file3 /user/hadoop/file4
返回值:
成功返回0,失败返回-1。
chgrp
使用方法:hadoop fs -chgrp [-R] GROUP URI [URI …] Change group association of files. With -R, make the change recursively through the directory structure. The user must be the owner of files, or else a super-user. Additional information is in the Permissions User Guide. –>
改变文件所属的组。使用-R将使改变在目录结构下递归进行。命令的使用者必须是文件的所有者或者超级用户。更多的信息请参见HDFS权限用户指南。
chmod
使用方法:hadoop fs -chmod [-R]
网址:http://hadoop.apache.org/docs/r1.0.4/cn/hdfs_shell.html
FS Shell
调用文件系统(FS)Shell命令应使用 bin/hadoop fs 的形式。 所有的的FS shell命令使用URI路径作为参数。URI格式是scheme://authority/path。对HDFS文件系统,scheme是hdfs,对本地文件系统,scheme是file。其中scheme和authority参数都是可选的,如果未加指定,就会使用配置中指定的默认scheme。一个HDFS文件或目录比如/parent/child可以表示成hdfs://namenode:namenodeport/parent/child,或者更简单的/parent/child(假设你配置文件中的默认值是namenode:namenodeport)。大多数FS Shell命令的行为和对应的Unix Shell命令类似,不同之处会在下面介绍各命令使用详情时指出。出错信息会输出到stderr,其他信息输出到stdout。
cat
使用方法:hadoop fs -cat URI [URI …]
将路径指定文件的内容输出到stdout。
示例:
hadoop fs -cat hdfs://host1:port1/file1 hdfs://host2:port2/file2
hadoop fs -cat file:///file3 /user/hadoop/file4
返回值:
成功返回0,失败返回-1。
chgrp
使用方法:hadoop fs -chgrp [-R] GROUP URI [URI …] Change group association of files. With -R, make the change recursively through the directory structure. The user must be the owner of files, or else a super-user. Additional information is in the Permissions User Guide. –>
改变文件所属的组。使用-R将使改变在目录结构下递归进行。命令的使用者必须是文件的所有者或者超级用户。更多的信息请参见HDFS权限用户指南。
chmod
使用方法:hadoop fs -chmod [-R]
相关文章推荐
- Ejabberd V.S Openfire
- Linux服务器系统文字编码查看和修改
- linux命令
- linux上进程状态查询
- opencv学习笔记(二十)——形态学滤波
- apache 报apache 报 The server is temporarily unable to service your request due to maintenance downtim
- linux环境下,weblogic11G启用管理端口后,配置t3s协议,并配置-Dweblogic.security.TrustKeyStore=DemoTrust后,仍然提示java.io.IOEx
- centos7 安装配置ftp
- Apache多站点配置
- CodeForces#325 B. Laurenty and Shop
- Nginx+FastCGI+Django请求静态(css,js,img等)
- linux卸载自带jdk与jdk配置
- shell删除最后一列、删除第一行、比较文件
- 安卓opencv人脸检测
- linux运维实战练习-2015年11月8日-11月17日课程
- handleOpenURL 不能执行
- centos6.7 配置多个ip
- HBase权威指南 高清中文版 PDF(来自linuxidc)
- Hadoop + HBase (自带zookeeper 也可单独加) 集群部署
- 一些好的在线网站