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 Tags

Articles tagged with: ksh

Remove Duplicate Posts in WordPress

December 5, 2009 – 10:28 pm
wordpress_0004

Below is the SQL script that will attempt to identify and remove duplicate posts in your WordPress database. This script can be useful for autoblogging. If you use plugins like WP-o-Matic to pull full-text RSS …

WordPress Backup Script

October 23, 2009 – 1:04 pm
wordpress_0006

Whenever a new WordPress version comes out, I get an itch to upgrade as quickly as possible. Generally, this is not a good idea, unless you enjoy working out new software bugs and dealing with …

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.

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 …

Solaris One-Liners

March 21, 2006 – 12:41 pm
sun_solaris_0001

Useful Solaris commands for system administrators

Using rsync to copy files

November 21, 2005 – 4:00 pm
hard-disk_00416535

In the following example we need to make sure that /export/home on server host2 looks exactly like /export/home on host1. Thus, our SOURCE is host1:/export/home and our TARGET is host2:/export/home
There are two ways of using …

Database operations with SQL and Korn shell

November 20, 2005 – 11:46 am
logo_mysql

The following Korn shell function will read the a directory containing CSV data files named server_sysstat.20051119.csv with format:

Find largest files

November 19, 2005 – 11:17 pm
shell

How to find the largest files in the directory tree on Solaris.