How to overwrite the existing files using hadoop fs -copyToLocal command

前端 未结 8 1163
小蘑菇
小蘑菇 2021-02-01 13:08

Is there any way we can overwrite existing files, while coping from HDFS using:

hadoop fs -copyToLocal  
         


        
8条回答
  •  孤独总比滥情好
    2021-02-01 13:38

    You can first delete, then write.

    hadoop fs -rmr removes everything under given path in hdfs including the path itself

    rm -rf removes in local file system.

    Make sure that there is no other file in the directory.

提交回复
热议问题