HDFS常用fs命令:
hadoop fs -ls
hadoop fs -ls -R
hadoop fs -cat
hadoop fs -chgrp [-R] group
hadoop fs -chown [-R] [owner] [:[group]]
hadoop fs -chown [-R]
hadoop fs -tail [-f]
hadoop fs -stat [format]
hadoop fs -touchz
hadoop fs -mkdir [-p]
hadoop fs -copyFromLocal
hadoop fs -copyToLocal [-ignorecrc] [-crc]
hadoop fs -cp
hadoop fs -du
hadoop fs -expunge 清空回收站
hadoop fs -get [-ignorecrc] [-crc]
hadoop fs -getmerge [-nl]
hadoop fs -mv
hadoop fs -put
hadoop fs -rm
hadoop fs -rm -r
hadoop fs -setrep [-R]
hadoop fs -test -[ezd]
-e检查文件是否存在,存在返回0,否则返回1
-z检查文件是否是0字节,是返回0否则返回1
-d如果路径是个目录,返回1,否则返回0
hadoop fs -text