# replace default cp with rsync.
cp() {
rsync -ahP --chmod=u+w -- "${@}"
}
# copy and also merge all changes (delete dst files that do not exist in src).
cp_merge() {
rsync -ahP --chmod=u+w --delete -- "${@}"
# copy by creating hardlinks.
cp_link() {
/usr/bin/cp -lr -- "${@}"
# default cp, a.k.a builtin cp.
bcp() {
/usr/bin/cp "${@}"
# cp_merge without writing anything.
cp_test() {
rsync -ahP --chmod=u+w --delete -n -- "${@}"