From 9ce84b823d16956403524028c7e1f2828064dfdd Mon Sep 17 00:00:00 2001 From: home Date: Sat, 2 Dec 2023 22:18:10 +0300 Subject: [PATCH] cp : add cp_test for cp_merge without any writes. --- .README.md | 1 + .config/bash/module/cp.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.README.md b/.README.md index 548d488..a012ff4 100644 --- a/.README.md +++ b/.README.md @@ -422,6 +422,7 @@ Command|Description `cp `|Copy files or dirs. Actually, it is an alias for `rsync -ahP`. Multiple `` could be specified. `cp_merge `|Mirror directories. Same as `rsync --delete`. `cp_link `|Copy directory by recursively creating hardlinks and directories. +`cp_test `|Test cp_merge without writing anything. `bcp `|Default `cp` command. ## Date. diff --git a/.config/bash/module/cp.sh b/.config/bash/module/cp.sh index 10c0c10..aaaf6ef 100644 --- a/.config/bash/module/cp.sh +++ b/.config/bash/module/cp.sh @@ -9,3 +9,6 @@ alias cp_link="/usr/bin/cp -lr" # default cp, a.k.a builtin cp. alias bcp="/usr/bin/cp" + +# cp_merge without writing anything. +alias cp_test="rsync -ahP --chmod=u+w --delete -n"