如何修改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