Subscribe to
Posts
Comments

Archive for the 'Linux' Category

Gem: Updated Bash completion

Victor Serbin sent me a version of the completion updated for Gem 1.0.1. You can get it here. Apparently, Ubuntu and Debian have begun to bundle this file with their rubygems packages. Great!

The gem command is the command line user interface to the RubyGems system for managing Ruby packages. This command has a few sub-commands itself and a long list of options that differ per sub-command. Remembering and typing them can be tedious, but thankfully, if you are using the bash command shell, it can help with […]

In order to keep multiple versions of a file, I sometimes add a timestamp to the filename. Doing this by hand is tedious and error-prone, but this chore can be automated by a small shell script. /usr/local/bin/timestamp #! /bin/sh for oldname ; do ts=`date +’%Y%m%d%H%M’ –reference=”$oldname”` newname=`echo $oldname | sed -nre “s/^(\\.?)([^\\.]+)(-[[:digit:]]{12})(\\..*)\$/\\1\\2-$ts\\4/p”` if [ -z […]

I’m using rsnapshot for making regular backups of my Linux box. Neither the computer, nor the external backup disk is running all the time, therefore it would not work to simply have cron run rsnapshot at fixed times. I want a little more flexibility than that. When the computer is off, there’s no point in […]

Fork me on GitHub