You are here


File renaming using sed and xargs: Prefixing all filenames with a 0 from the commandline

Submitted by Druss on Tue, 2011-01-25 00:56

Earlier today, I wanted to prefix a number of image files on a server with a 0. If this was on my desktop, I would have simply used a graphical tool such as the excellent Métamorphose. However, in this case, only a command-line was available. While Google threw up a number of bash scripts, I was curious to see if this could be done in a cleaner and more concise manner. Following the excellent reference to sed and more Google magicking, I arrived at

Eclipse: Galileo to Helios upgrade error message - Failed to create the Java Virtual Machine

Submitted by Druss on Tue, 2010-11-02 00:11

I just finished upgrading Eclipse from Galileo to the new Helios release. I performed the upgrade by adding Helios to the software sources list and updating and all seemed to go well. However, when I restarted Eclipse, I got a splash image which indicated that the upgrade had gone through and then ran into the following error message:
Failed to create the Java Virtual Machine

TortoiseSVN: Cleanup failed to process the following paths

Submitted by Druss on Wed, 2010-10-13 21:06

When I attempted to make a commit using TortoiseSVN today, I was told that there was a problem and that I would have to run the cleanup command to sort things out. Running the command, however, resulted in the following further error message:
Cleanup failed to process the following paths:

Vim: Going to the nth character in a file

Submitted by Druss on Sun, 2010-08-15 00:05

I ran into an error message today that only specified the character number in a configuration file without making any reference to the line number. Rather odd. In any case, since Vim (and my usual preference, GVim) is an excellent editor, I expected this to be a cinch. Unfortunately, a few minutes of head-scratching later, I was still quite clueless as to how to accomplish this seemingly routine task.

I do know that typing:
will move the cursor to the 1000th line in the file.

Vim: Scrolling a file with no line-breaks

Submitted by Druss on Sat, 2010-08-14 23:56

When a file has no line-breaks and is just one single line, navigating line by line is obviously not an option. Some editors wrap the text and treat each pseudo-line as a separate element and allow us to scroll through them. Others don't. Vim, by default doesn't.

Or to be more precise, Vim (and GVim) do not allow us to scroll through such files using the arrow keys. Instead, the following short-cuts do the business:

Scroll up: g, k / g, up
Scroll down: g, j / g, down
Beginning of the line: g, ^ [i.e. g, SHIFT + 6 on a keyboard with a US layout]

Windows 7: ping outputs a general failure message

Submitted by Druss on Sat, 2010-06-05 10:32

Here I was, earlier today, simply trying to swap the default gateway of the Ethernet card of my Windows 7 box, and ran into the following peculiarity. First off, as soon as I swapped the gateway, my Ethernet connection went down. To investigate this, I popped into the command-line and tried pinging the new gateway only to run into the error message below:
General failure.

Configuring Samba share on Lucid

Submitted by Druss on Wed, 2010-05-05 00:00

I performed a fresh install of Kubuntu's new distro - Lucid whatever - today. As per usual, there is no front-end to configure Samba and I had to do it the old-fashioned way. The following are steps that should walk you through a basic configuration on creating a share that can be accessed from Windows:

  1. Install Samba using sudo aptitude install samba smbfs
  2. Navigate to /etc/samba/

OOO Calc: Autofilter hiding rows after removal

Submitted by Druss on Mon, 2010-03-01 11:14

Off late, I have had to use's Calc quite regularly. While it generally works quite well, it has a lot of wonky little bugs that can be quite frustrating. One of these has to do with the autofilter.

When using the autofilter, you will, on occasion find that once you are done using it and try to remove it, a number of rows, usually empty, will be missing post-removal. The following are steps/tools that might help you recover these rows:

    apache2: bad user name ${APACHE_RUN_USER}

    Submitted by Druss on Thu, 2010-02-04 03:06

    While trying to check the vhost configuration on my Kubuntu dev box, I had to run httpd -S. Of course, since ubuntu renamed httpd to apache (a bit like calling a Veyron a Bugatti), I had to run apache2 -S. This however led to the following error message:
    apache2: bad user name ${APACHE_RUN_USER}


    Subscribe to RSS - Tip