summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.zsh/rc/30functions5
1 files changed, 5 insertions, 0 deletions
diff --git a/.zsh/rc/30functions b/.zsh/rc/30functions
index f2096fd..df95ee4 100644
--- a/.zsh/rc/30functions
+++ b/.zsh/rc/30functions
@@ -20,6 +20,11 @@ update_zshrc() {
exec zsh
}
+# add current time to a file
+mbk() {
+ mv -b ${1} ${1}_`date +%Y-%m-%d_%T`
+}
+
# easily make backups
bk() {
cp -b ${1} ${1}_`date +%Y-%m-%d_%T`