HOW-TOs

I've written about bash quoting before, and yes, it's about as exciting as watching paint dry or listening to the corn grow. It can also be extremely frustrating when it doesn't do what you want, case in point: trying to script the updating of a field in a mysql table when the field to be changed contains quote characters.

It's fairly simple to find large files on your system using commands such as find, but if you're looking for directories over a certain size find won't help you. The Perl script presented here can help you track down those explosively large directories.

As I've mentioned before I'm an openSUSE user, and as long as they don't make the "U" lower case again, I'll probably stick with it. When it comes to package management, OpenSUSE and SUSE Linux Enterprice (and SuSE before them) are usually associated with YaST (and yes, I'm still waiting for them to upper case the "a"). YaST works well but it's a bit verbose for installing a single package, and of course that's just more fodder for the apt-getters with all their apt-get install this and their apt-get install thats. And you can't argue with them, but there are other options with openSUSE: yum and apt4rpm come to mind, but the preferred solution is zypper.

In the last release of Ubuntu (9.04) the Ctrl+Alt+Backspace key sequence normally used to kill the X server was disabled by default. Apparently many people like to kill their X server this way so a workaround "dontzap" package was used to enable it. With the latest Ubuntu release (9.10, aka Karmic) it's even simpler to enable it.

Sometimes when you're watching online videos on youtube or other sites, you want to save some of them for later offline playback. You've probably heard of Firefox extensions like DownloadHeloper that can do this, but sometimes you may only have a bare version of Firefox, or perhaps a different browser, one that doesn't have a plugin for doing this. Using the tip below, you can save videos no matter what browser you're using.

I usually lock my screen when I leave my cubicle for a tea-break etc. With all the talk of saving energy these days I've disabled screen-savers on my system. Still, when I'd lock my screen I noticed that the LCD didn't turn off completely. Wanting to go as green as I could I wanted to switch off the LCD as well.

In Part I we tested out Android on VirtualBox. Now we'll try running Palm's WebOS as a Virtual Appliance.

This article assumes that you are using:

If you don't want to step up to a full monitoring solution such as Nagios you can create your own scripts for monitoring the things that you want to monitor, such as disk space. The following script alerts you when your root partition is almost full:

With Google and Verizon recently announcing that several Android phones will be coming out on their network, a Linux lover might have smartphones on the brain.  Obviously, having Linux running on your phone is awesome, but which Linux OS should you choose? AndroidWebOS?  Maybe even

Now that summer is over and your digital camera is full of pictures, how do you get them organized? At the command line of course! The script provided here automatically organizes them into sub-directories by date.

Everybody's seen redirection in bash commands, that's pretty common, but bash also allows you to define redirections when you define functions. This causes the redirections to be evaluated/executed whenever the function is called. This feature doesn't really give you any new features, just another way to express existing features.

In diff tool speak, a visual diff tool is a GUI application. Meld is such a tool: a tool for displaying differences between files (and directories) and also for merging the differences. Meld is programmed in Python.

Like other word processes, OpenOffice.org Writer makes creating tables of contents (ToCs) quick and easy. Unfortunately, it also works with unaesthetic defaults and allows you to make choices that complicate your work flow rather than improving it.

Fortunately, Writer is also flexible enough to allow you to produce useful, aesthetic ToCs if you follow a few basic steps.

If you saw yesterday's Tech Tip and were looking for more on using TCP/IP with bash's built-in /dev/tcp device file then read on. Here, we'll both read from, and write to a socket.

Most of us default to wget, curl, netcat and others when in need of network data from the commandline, not knowing, or perhaps forgetting, that bash often provides the support that we need using redirection from /dev/proto/host/port.

Newsletter

Each week Linux Journal editors will tell you what's hot in the world of Linux. You will receive late breaking news, technical tips and tricks, and links to in-depth stories featured on www.linuxjournal.com.
Sign up for our Email Newsletter

Tech Tip Videos

From the Magazine

December 2009, #188

If last month's Infrastrucuture issue was too "big" for you then try on this month's Embedded issue. Find out how to use Player for programming mobile robots, build a humidity controller for your root cellar, find out how to reduce the boot time of your embedded system, and if you're new to embedded systems find out the basics that go into one. You can also read about the Beagle Board, the Mesh Potato and a spate of other interestingly named items. And along with our regular columns don't miss our new monthly column: Economy Size Geek.


Read this issue