Cp : Add rcp_merge_hash.

This commit is contained in:
Dmitry Voronin 2024-04-12 17:06:19 +03:00
parent 7210f32565
commit 07472c8964
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -18,6 +18,12 @@
rsync -ahP --chmod=u+w --delete --size-only "''${@}"
}
# Copy and also merge all changes BY CHECKSUM (delete dst files that do not exist in src, compare hashes).
# Usage: rcp_merge_hash <FROM> <TO>
function rcp_merge_hash() {
rsync -ahP --chmod=u+w --delete --checksum "''${@}"
}
# Copy by creating hardlinks.
# Works for directories, too.
# Usage: cp_link <FROM> <TO>