HOW-TOs

Tech Tip: Some Useful Vim Options

Vim is one the more popular choices of text editors for Linux. For vim, there are a few non-default options that may be useful whether editing config files or writing scripts in your favorite language.

Convert SpreadSheets to CSV files with Python and pyuno, Part 1v2

Some months back I developed some pyuno code for converting spreadsheets into CSV files from the command line. Pyuno being the Python interface to the OpenOffice runtime. One of the enhancement suggestions I got was to add the ability to extract all the sheets and/or a specific sheet rather than always extracting the first sheet. The following update to the code does just that.

OpenOffice.org Calc: The Mysteries of DataPilots Revealed

If you're coming fresh from Microsoft Excel, you might wonder where the Pivot tables are in OpenOffice.org Calc. The problem is, they're masquerading under the name of DataPilots. But, under any name, DataPilots are Calc's way of allowing you to quickly reorganize information in a range of cells so that you can gain a new insight into them.

Using Bash History More Efficiently

If you've used bash for a while you probably know that the commands you enter are saved in the file ~/.bash_history when you log out. Next time you log in, bash automatically loads these history commands from the saved file and you can then use the up and down arrow keys to browse your command history and find the command you want rather than re-entering it.

Tech Tip: Setup Your Linux Server to Use a Serial Console

Do you have a linux server without a keyboard or monitor? Need to administer the server on-site but don't want to lug over a monitor and keyboard (or kvm)? Then setup the server to output the console to a serial port and use screen/minicom (Hyperterminal or putty in Windows) to console into the server over a serial cable.

Tech Tip: Determining What's Been Changed on RPM Based Systems

As a consultant, I am often faced with an unfamiliar Linux system (usually RHEL). I always find it useful to understand which files that shipped with rpm packages have been modified, since it's usually a good indicator of what customizations have been performed on the system. To determine the modified files, I simply run:

Tech Tip: Using the Synaptic Package Manager to Ease Installations

On Debian based systems, or any that use Synaptic for package management, you can use Synaptic to help you setup multiple systems with the same software. On the first system select all the packages you want and then under the File menu use Save Markings or Save Markings as to save your selections to a file.

Creating Secure Tunnels With ssh

If you manage remote servers or if you have more than one computer you most likely have used the ssh command. A simple description of ssh is that it's a secure version of telnet, but that's like saying a Porsche is a just a better version of a Volkswagen bug.

Creating Queries in OpenOffice.org Base

Queries are the database equivalent of filters in a spreadsheet. Just as a filter can limit and reorganize the information displayed in a spreadsheet, so a query limits and reorganizes the information in a database. Either can be an efficient way of finding the information you want, especially when you're dealing with thousands of records.

Using ps to Monitor Processes

In a previous tech tip, we saw how to use kill to monitor processes. Another option is to use ps. With both methods, you can check $? for success/failure. However, note that kill -0 may return failure even if the process actually exists. This happens when the current user has no permission to the process in question, for example: kill -0 1.