Featured »

March 2, 2022 – 2:00 pm

Books have been written on the subject of awk and sed. Here’s a small sample of commands I put together over the years that are useful for everyday system administration tasks. Most of these tasks …

Read the full story »
Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Archive by Category

Articles in Commands & Shells

Improving WordPress Performance

May 4, 2008 – 12:39 pm
wordpress_0001

WordPress is a great blogging engine and decent CMS. Unfortunately, most available WordPress themes- even those claiming to be “minimalist” – are bloated and slow to load. Heavy CSS stylesheets, multiple Java scripts, numerous graphics …

Use Perl inside Shell scripts

May 1, 2008 – 11:44 am
shell_002

Perl is a far more powerful programming tool than any shell script. Sometimes you want to borrow some of that power without having to rewrite your entire shell script. There is an easy way to integrate Perl snippets inside your shell script.

Installing and Configuring Ganglia

March 25, 2008 – 4:19 pm
storage barrels cluster hpc

Ganglia is a distributed performance monitoring application used primarily for tracking status of high-performance compute (HPC) clusters. Ganglia is a royal pain in the ass to install and configure even for a seasoned Unix sysadmin. …

Log Monitoring with Swatch

March 11, 2008 – 1:43 pm
binoculars watch security rifle gun

Swatch is a Perl-based log monitoring tool that can match regular expressions and perform automated actions. The tool is useful for monitoring system log files in real time with an option to run external commands …

Linux User Activity Management

March 9, 2008 – 2:59 pm
sniper soldier

The following is a detailed look into managing Linux users and the system resources they utilize. Disabling user access; halting, killing, and re-nicing user processes; controlling disk space allocation are all points covered by this …

Korn Shell Arrays

January 24, 2008 – 11:13 am
shell_001

Here are a few useful examples of how to use data arrays within Korn shell. Arrays are a great tool for storing user input and other data for quick, on-the-fly access. If, for example, you …

A simple text string search script

December 13, 2007 – 1:52 pm
shell

Sometimes you need to locate a text string in various configuration files. You don’t know which files. You can just use “grep *”, but the output is rather messy and you can only search in …

Contacting the sysadmin from command line

September 28, 2006 – 11:10 pm
colorful shells

If you are a sysadmin, communicating with your users is an important aspect of your job. Phone, e-mail, SMS, and various service request systems are commonly used by most businesses. The problem with all these …

Changing time

May 11, 2006 – 12:12 am
time clock watch

Unix systems record several time parameters associated with files. Sometimes you might need to set time parameters on a file to a particular value. Or you might need to modify a file without changing any …

Solaris One-Liners

March 21, 2006 – 12:41 pm
sun_solaris_0001

Useful Solaris commands for system administrators

CUPS printing on Solaris 10

February 28, 2006 – 12:08 pm
sun_solaris_0002

Download the Companion CD for Solaris 10 GA on: Solaris 10 Companion cd download

Generating complex SQL queries with shell scripts

February 21, 2006 – 9:08 am
shell_0004

It is sometimes necessary to use complex select and insert queries with dozens of variables. Writing such queries by hand is a tedious process and the chance of making a mistake is high. A few …

NFS-mount “Permission denied” error

February 16, 2006 – 11:27 am
keys_security_lock_01

NFS is a relatively uncomplicated functionality of any Unix system. However, from time to time you are bound to run in the “permission denied” error while trying to NFS-mount a filesystem. Everything seems to be …

Wget Google image collector

February 1, 2006 – 1:07 pm
dump truck

Google Images is an extremely useful tool for webmasters, designers, editors, and just about anybody else who’s in a hurry to find just the right photo or clipart. However, this Google tool has a couple …

Using pkg-get on Solaris

December 13, 2005 – 12:27 pm
sun_solaris_0002

Pkg-get Installation Notes
Pkg-get is an open-source,  Sun-approved software installation and management tool for Sun Solaris. You can use pkg-get to install a variety of pre-compiled software without having to worry about version compatibility, patch requirements, …

Exporting spreadsheet data to MySQL

December 9, 2005 – 2:10 am
logo_mysql

The following is a process for migrating spreadsheet data to MySQL database using a Shell script in a Unix environment. To follow this tutorial you must already know how to create MySQL schemas and tables. …

Cygwin X-server configuration

December 6, 2005 – 12:12 am
network_cable_01

To connect with Cygwin to a Unix X-server in XDMCP-broadcast mode, create a shortcut as shown below. In the target field enter:

Handling errors and trapping system calls

December 2, 2005 – 11:20 am
shell_002

In the course of writing a shell script it is important to consider possible error and unexpected interrupts. Let’s say you wrote an interactive script that allows users to archive old files to free up …

Passing shell variables to awk and sed

December 2, 2005 – 10:23 am
shell_002

By default awk and sed do not expand shell or system variables and do not pass their own variables back to the shell. To use shell variables awk and sed statements must be included in …

Solaris performance monitoring

November 28, 2005 – 4:47 pm
sun_solaris_0002

The following is a brief overview of common performance monitoring tools for Solaris, including built-in tools, freeware add-ons, and commercial applications.
Souce: http://www.sunperf.com/perfmontools.html
Built-in Tools
vmstat
The vm in vmstat stands for Virtual Memory, of course. So let us …

Wget examples and scripts

November 27, 2005 – 3:19 pm
dump truck

Wget is a command-line Web browser for Unix and Windows. Wget can download Web pages and files; it can submit form data and follow links; it can mirror entire Web sites and make local copies. …

Create boot block on Solaris disk

November 22, 2005 – 11:29 pm
HP-Greets-IBM-2

To make a Solaris disk bootable you need to install the boot block on the disk. This should be done, for example, after copying the primary boot disk to the secondary disk.