Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
-
Added a new option -delete to DistCp so that if the files/directories exist in dst but not in src will be deleted. It uses FsShell to do delete, so that it will use trash if the trash is enable.
Description
One use case of DistCp is to sync two directories. Currently, DistCp has an -update option for overwriting dst files if src is different from dst. However, it is not enough for sync. If there are some files in dst but not exist in src, there is no easy way to delete them. We should add a new option, say -delete, so that DistCp will delete the non-existing in dst.
Attachments
Attachments
Issue Links
- is depended upon by
-
HADOOP-3942 Update DistCp documentation
- Closed
- is related to
-
HADOOP-5227 distcp -delete option deletes all files from the destination directory
- Closed
-
HADOOP-3873 DistCp should have an option for limiting the number of files/bytes being copied
- Closed