Is there any way we can overwrite existing files, while coping from HDFS
using:
hadoop fs -copyToLocal
You could try this :
bin/hadoop fs -rm /path_of_the_file | grep "0" | bin/hadoop fs -put ~/input_path /output_path
You can first delete, then write.
hadoop fs -rmr <path>
removes everything under given path in hdfs including the path itself
rm -rf <path>
removes in local file system.
Make sure that there is no other file in the directory.