Monday, January 26, 2009

Application launchers

An application launcher is a little piece of utility software that runs in the back ground of the OS and waits for a key combination to be pressed. Once you hit that combination (say alt + space), a little window pops up that allows you to start typing. You can then type the first few letters of the app you want to launch, and then hit enter and the app will pop up. This allows you to launch apps without taking your hand off the keyboard. For people like me (who live and die by shortcuts), this is the promised land. Many of these app launchers can be configured to open folders, search the hard drive, and many more tasks with endless plug-ins.

There are a number of apps that do this, as listed on Wikipedia, but I'll talk about the three that I've used/use on a daily basis. First there's Launchy. Launchy is a free (as is freedom), utility that runs on both Windows and Linux and has plug-in support as well as configurable key combos. I use this everyday at work and have very few problems with it. The app will "learn" your favorites as you pic them out of a list, so you won't need to pick them the second time around. Some plug-ins you may be interested in are: putty integration, weby, and one I've recently started using, Google calc. From my experience, this app works as well on Linux (Ubuntu) as it does on Windows.

Next up is Quicksilver for Mac OS X. This is the best application launcher around in my opinion. It is very polished and not only searches, and launches well, but has all the visual crack you need and love on OS X. Quicksilver also supports plug-ins, and has many configurable preferences; not to mention you can tweak the look and feel.

Lastly, we have a Linux (KDE) only option known as Katapult. This is my least favorite option out of the bunch. And being a Linux hippy, I hate to admit that there is a Mac option that I like better. It works well enough, but it doesn't learn my preferences, which kind of gets annoying. It is skinable and about the same configuration options as Launchy.

Anyway, once you start using one of these fabulous applications, you'll find it painful to go back. I have one of these installed on every box that I use regularly, and I find that I can work much more efficiently.

- - Rob

Tuesday, January 20, 2009

Today's obscure Linux problem

With this post, I'll be taking a cue from my friend Stu over at Corrosive Content, and posting something helpful. At work I often run into obscure problems that take a lot of time to solve. Because I work on Windows, Mac, and various other Unix flavors, I get a chance to see the worst each operating system has to offer. This little "bug" is one of those neat bugs that just doesn't seem like it can actually be true.

You run a df and notice that your /tmp directory is full. No problem, just cd /tmp and then see what's in there. After listing the files, you notice that there are a lot of .shitty files in the directory and you know you can delete those. No problem, a quick rm *.shitty should do the trick...Only one problem, you run the command and you get this cute little message:

Argument list too long

What? Let's just list the files and see what this is all about: ls *.shitty

Argument list too long

You've got to be kidding right? As it turns out, there is a limited size buffer created for shell commands and rm *.shitty actually expands to rm 1.shitty 2.shitty 3.shitty, which quickly becomes too big for the command line. Here are a few options I came up with:

The simplest answer is to do something like this:

find . -name "*.shitty" | xargs rm

This doesn't work if you have spaces in the names of the .shitty files or if the .shitty files have special characters. So you should do this:

find . -name "*.shitty" -print0 | xargs -0 rm

And finally, an extra little tid bit...Say you are in a parent directory and you want to get rid of all the files in a set up children directories:

find . -wholename "*/FunctionTests/InputData/*.shitty" -print0 | xargs -0 rm

This will go through all the directories in the current directory and look for *.shitty files in the FunctionTests/InputData folders under them. The option that is special here is the -wholename option. If you try to do this with -name, you will get an error or on some versions of find, you will get unexpected results.

- - Rob