如何修改HDFS上文件


如果只想append操作:

1. echo "<Text to append>" | hdfs dfs -appendToFile - yourHdfsPath/test.txt 

如果想modify操作:

1 hdfs dfs -get yourHdfsPath/test.txt
2 vi test.txt #or use any other tool and modify it
3 hdfs dfs -put -f test.txt yourHdfsPath/test.txt

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM