diff options
author | Florian Pritz <bluewind@xinu.at> | 2014-11-07 17:57:40 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2014-11-07 17:57:40 +0100 |
commit | ef5075dd2c1c5926ac209612341085cd6c584399 (patch) | |
tree | 54bdef7c4d8f31e50f52e5224d10483d9eee172a /.zshrc | |
parent | 51274f7b6bb5df9b8f3703fd528a25575330957f (diff) | |
download | dotfiles-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-- | .zshrc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |