Archive for the ‘Linux’ Category

How to Remove Spaces from Filenames in Linux/UNIX

Wednesday, April 22nd, 2009

This command will rename all files that have spaces in their filenames, in the current directory and recursively in its subdirectories, so that in the new filenames all spaces are replaced with underscores (‘_’ characters). find . -name ‘* *’ | while read file; do target=`echo “$file” | sed ‘s/ /_/g’`; echo “Renaming ‘$file’ to [...]


How to run MXit on your PC

Wednesday, April 15th, 2009

MXit recently released a libPurple plugin. You can use the plugin to login and chat with your MXit account from your computer, by using an instant messaging client that supports libPurple (e.g. Pidgin). MXit on Windows To run MXit on a Windows PC: Download Pidgin for Windows here:http://www.pidgin.im/download/windows/ Install Pidgin on your computer. Download the [...]


Code completion (IntelliSense) for C++ in Vim with OmniCppComplete

Friday, March 20th, 2009

C++ autocompletion is possible with VIM. This is officially the coolest tech discovery I’ve made this year. And it’s easy to setup. Here’s how to configure C++ IntelliSense for Vim, with an example that demonstrates how to enable code completion for the the C++ Standard Template Library (STL). 1. Download You need the following: Vim [...]


Floating point arithmetic using bc

Monday, March 16th, 2009

The bc shell utility that is available on most UNIX/Linux distributions defaults to integer arithmetic (i.e. throws away anything after the comma). To prevent this, you can set the “scale” option in bc. E.g., the following command will return 3.333: echo “scale=3; 10/3″ | bc