Familiarity with command prompts and shell scripts is still necessary if you want to get the most from your GNU/Linux system, but the less time you spend doing that the better, right? Two powerful ways to minimize your time at the command line are shell aliases and functions.
There are numerous documents, tutorials and guides detailing the workings and usage of cron, the de facto tool for scheduling jobs on Linux. While traditional cron jobs are executed at set times, inotify cron, or incron, is a cron clone that watches the filesystem for specified changes and executes the relevant commands. You can set incron to monitor a particular file or directory for changes and schedule jobs for when those changes occur.
In this context, a one-liner is a set of commands normally joined through a pipe (|). When joined by a pipe, the command on the left passes its output to the command on the right. Simple or complex, you can get useful results from a single line at the bash command prompt.
The trash project allows you to interact with your desktop trashcan from the command line. It lets users "undo" deletions made with the trash command in a similar manner to restoring files from the trashcan in a desktop environment. For experienced Linux users, the trash command comes in handy when you want to put a file into the trashcan from the command line.
When the need arises to send email from the command line, many folks first think of the mail(1) command. A better choice might be the email program, which gives you the ability to send email to an SMTP server over SSL, offers MIME support including ability to attach one or more files to your emails, uses an address book to store your recipients, and lets you digitally sign and encrypt your messages.
images2mpg, a simple utility that's part of the KDE Image Plugin Interface (KIPI), lets you create an MPEG file from image files. Relying on a handful of command-line tools including the ImageMagick suite and mjpegtools, images2mpg creates wonderful videos from your images and even lets you insert your favorite song as the background. It supports SVCD, DVD, VCD, and XVCD video formats.
In a sense, the desktop is the best thing that ever happened to the command line. Because a virtual terminal runs in a graphical environment, it boasts all sorts of enhancements that the unadorned shell lacks -- everything from multiple tabs to easy selection of display fonts and background and foreground colors. Perhaps the resulting power and convenience explains why, even at a time when the emphasis is on giving every application a graphical interface -- no matter how inappropriately -- people still write useful utilities for virtual terminals. A good example is Terminator, a program designed to perform one simple function: displaying multiple instances of the GNOME terminal within the same window.
Everyone knows what a Linux shell is -- you open up a Linux terminal window (such as Konsole or xterm), type in some commands, and there you are, using your Linux shell. Write your commands to a file, make it executable, run it, and you're a shell programmer. But did you know that there are different shells that you can use, and that each shell operates in a slightly different way? My personal favorite is the Korn shell; by the end of this article, it may be your favorite as well.
Sometimes when I run ls to get a directory listing, I am looking for a specific file, but I want to see the whole context where the file resides. While you can pipe the output of ls to grep, that doesn't show you the whole directory with the matched files highlighted in a different color. I create a small script to do just what I want.
Emacs fans, limber up your fingers -- there's a new GNU in town. Almost six years after the release of the previous version, the Free Software Foundation has announced the release of GNU Emacs 22. (Actually, 22.1, but who's counting?) This release includes support for GTK+, drag and drop support for X, a number of new modes, and a graphical interface to the GNU Debugger (GDB).