hadoop深入简出(二)

1.上传文件

Hadoop fs -put hello.txt /

2.查看上传的文件

hadoop fs -ls /

hadoop fs -text /hello.txt

两个命令都可以

3.创建文件夹

hadoop fs -mkdir /test

4.递归展示文件夹

hadoop fs -lsr /这是递归展示hadoop的文件夹

//查看递归文件

扫描二维码关注公众号,回复: 2288341 查看本文章

5.hadoop fs -ls -r /

6.将文件复制到另一个文件夹下

hadoop fs -copyFromLocal hello.txt /test/a/b/h.txt

查看

hadoop fs -ls /

下载到本地

hadoop fs -get /tsts/a/b/h.txt

猜你喜欢

转载自www.cnblogs.com/chenligeng/p/9346834.html