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

前端 未结 8 1167
小蘑菇
小蘑菇 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:18

    fs -copyFromLocal -f $LOCAL_MOUNT_SRC_PATH/yourfilename.txt your_hdfs_file-path
    

    So -f option does the trick for you.

    It also works for -copyToLocal as well.

提交回复
热议问题