summaryrefslogtreecommitdiffstats
path: root/.zshrc
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-11-07 17:57:40 +0100
committerFlorian Pritz <bluewind@xinu.at>2014-11-07 17:57:40 +0100
commitef5075dd2c1c5926ac209612341085cd6c584399 (patch)
tree54bdef7c4d8f31e50f52e5224d10483d9eee172a /.zshrc
parent51274f7b6bb5df9b8f3703fd528a25575330957f (diff)
downloaddotfiles-ef5075dd2c1c5926ac209612341085cd6c584399.tar.gz
dotfiles-ef5075dd2c1c5926ac209612341085cd6c584399.tar.xz
zshrc: bk: use rsync to keep mtime and other data
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc4
1 files changed, 2 insertions, 2 deletions
diff --git a/.zshrc b/.zshrc
index 282e98d..f83b7da 100644
--- a/.zshrc
+++ b/.zshrc
@@ -257,9 +257,9 @@ mbk() {
mv -b "${1}" "$(echo $1 | sed -r "s/(.*)(\.|$)(.*)/\1_`date +%Y-%m-%d_%H%M%S`\2\3/")"
}
-# easily make backups
+# easily make backups
bk() {
- cp -br "${1}" "$(echo $1 | sed -r "s/(.*)(\.|$)(.*)/\1_`date +%Y-%m-%d_%H%M%S`\2\3/")"
+ rsync -phaxPHAX "${1}" "$(echo $1 | sed -r "s/(.*)(\.|$)(.*)/\1_`date +%Y-%m-%d_%H%M%S`\2\3/")"
}
# chpwd () => a function which is executed whenever the directory is changed