Browse Source

Add bck function to .bash_functions

Andrea Miglietta 6 years ago
parent
commit
8850dc0557
1 changed files with 5 additions and 0 deletions
  1. 5 0
      .bash_functions

+ 5 - 0
.bash_functions

@@ -35,3 +35,8 @@ function swap() {
     mv "$TMPFILE" "$2"
 }
 
+function bck() {
+    [ ! -e "$1" ] && echo "bck: $1 file not found" && return 1
+    cp "$1" "$1_$(date +%Y%m%d-%H%M%S)"
+}
+