/etc/zsh/zshrc: added bk() to backup a file with iso time tagged
authorMichael Gebetsroither <michael.geb@gmx.at>
Fri, 5 Oct 2007 00:47:35 +0000 (02:47 +0200)
committerMichael Gebetsroither <michael.geb@gmx.at>
Fri, 5 Oct 2007 00:47:35 +0000 (02:47 +0200)
debian/changelog
etc/zsh/zshrc

index e638bfc..b464765 100644 (file)
@@ -1,5 +1,6 @@
 grml-etc-core (0.3.31) unstable; urgency=low
 
+  [ Michael Prokop ]
   * /etc/skel/.zshrc: use same pattern in function wikien as in wikide.
     (Thanks, wuehlmaus)
   * Added /etc/apt/apt.conf.example + /etc/apt/hg-snapshot-script
@@ -12,7 +13,10 @@ grml-etc-core (0.3.31) unstable; urgency=low
     - improve usage of yacpi, thanks to Alexander 'z3ttacht' Steinböck for
       the initial patch! [Closes: issue301]
 
- -- Michael Prokop <mika@grml.org>  Wed, 26 Sep 2007 22:48:07 +0200
+  [ Michael Gebetsroither ]
+  * /etc/zsh/zshrc: added bk() to backup a file with iso time tagged.
+
+ -- Michael Gebetsroither <gebi@grml.org>  Fri, 05 Oct 2007 02:47:14 +0200
 
 grml-etc-core (0.3.30) unstable; urgency=low
 
index 0f43289..a13720a 100644 (file)
@@ -1502,6 +1502,11 @@ If you want to use xinit anyway please call \"/usr/bin/xinit\"."
     exec env -i ENV="/etc/minimal-shellrc" HOME="$HOME" TERM="$TERM" ksh
   }
 
+  # make a backup of a file
+  bk() {
+    cp -a "$1" "${1}_$(date --iso-8601=seconds)"
+  }
+
   # Switching shell safely and efficiently? http://www.zsh.org/mla/workers/2001/msg02410.html
   # bash() {
   #  NO_SWITCH="yes" command bash "$@"