HDFS上创建文件、写入内容

1.创建文件

hdfs dfs -touchz /aaa/aa.txt

2.写入内容

echo "<Text to append>" | hdfs dfs -appendToFile - /aaa/aa.txt 

 

posted @ 2017-10-12 16:38  银河系上的地球  阅读(13562)  评论(1编辑  收藏  举报