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 Featured

Awk & sed Snippets for SysAdmins

March 2, 2022 – 2:00 pm
8vl3onvznkopxa6ny9995yrc4gw[1]

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 …

Finding Duplicate Photos

February 15, 2022 – 1:57 pm
9dwz62kvm0gtjya9kwb7pawtk9y[1]

Being a shutterbug and a digital hoarder can get expensive. A couple of days ago, my
TerraMaster D5-300 5-bay DAS crashed. Again. This time it was the power supply. I replaced it only to discover that …

Collatz Conjecture in Bash

February 8, 2022 – 1:55 pm
5o2y78yvwlg2lfep7d8fnznsnr3[1]

The Collatz conjecture is a math problem from the mid-1930s. It involves an algorithm that starts with any positive integer, and then each following number is made by taking the previous number and changing it. …

Simple Math from Bash Command Line

February 1, 2022 – 1:53 pm
e4126w5dkl69jw9cm2xj39j8pba[1]

Chances are, most shell scripts you write will require some math operations, even if it’s something as simple as incrementing a variable inside of a loop. As with everything else in Linux, there are multiple …

Focus Stacking with Lightroom and Photoshop

January 24, 2022 – 1:50 pm
zxulfg358ydpeyelfjppawbkxhr[1]

Not the usual topic for this blog and not the most comprehensive guide on the subject out there, but here I go anyway. Focus stacking combines multiple photos taken at different focal distances into an …

Peculiar Linux Command-Line Tools

January 10, 2022 – 1:45 pm
9yap7otat457ctjm63g78ann8mv[1]

Some Linux CLI commands I type every day, probably hundreds of times. Others – on a rare occasion. But there’s a category of truly esoteric utilities tailor-made for some singular and often exotic purpose. I …

NFS I/O Stats with Logging

January 3, 2022 – 1:43 pm
tq9mhhd5xy2q0kto2j1785n6odv[1]

The nfsiostat is an excellent tool for analyzing NFS performance. The only major problem with this utility is that it’s designed to be used interactively. It does not have logging or timestamping capabilities. I needed …

Inventorying NFS Mounts and Mount Options

December 26, 2021 – 1:41 pm
4ucne6vs8m7hqdl0el9ddqd1sql[1]

As time goes by, NFS mounts multiply like rabbits. Added by many different people over the years, these entries present a dizzying variety of mount options – most are a copy-paste job that makes little …

Joining Text Files and Data Columns

December 18, 2021 – 12:17 pm
p65q1znipa66jngo3jjvbnmb7s7-scaled[1]

When working with application logs and other text files, it is often useful to view the contents of different source files side-by-side. Here we will take a quick look at various command-line methods for joining …

Convert Color Text to Images in Bash

December 11, 2021 – 12:14 pm
uw4wrbh91igtkstbw6zr43yc5my[1]

The textmg is a cool little CLI tool written by jiro4989 – a systems engineer from Japan – that allows you to convert the color output in a terminal window to an image file. I …

Solving Crossword Puzzles from CLI

December 4, 2021 – 12:08 pm
jddujk6sil1frr05tgusp596m0x[1]

Linux command-line tools provide access to a wealth of dictionaries, encyclopedias, thesauri, directories, and other reference sources. Learning to use these tools is a worthwhile endeavor even if solving crossword puzzles is not your favorite …

Productivity Shortcuts for .bashrc

November 27, 2021 – 12:06 pm
q3rkytdeesvavynm5bf9l8ejk6m[1]

Some of the useful (more or less) aliases and functions for the .bashrc file to make your life a little easier and delay the onset of carpal tunnel syndrome.

Decision Making Using Python TOPSIS

November 20, 2021 – 12:03 pm
96wed5sso8yxby9c0qj83cnkh6s[1]

In a nutshell, TOPSIS – the Technique for Order of Preference by Similarity to Ideal Solution – seeks out one of many options that is the closest to the ideal option while at the same …

Using Variables in Bash

November 13, 2021 – 12:01 pm
7svf2cvkbbkpa19u2ja8d98dnt8[1]

A few quick tips on using variables in your Bash scripts. Nothing fancy here, just good practices that we often overlook.

WordPress: Post-processing of the image failed

November 6, 2021 – 11:59 am
ytioq398kc1wnvvz95uixhcn5ii[1]

This particular WordPress issue appeared with version 5.3 and is refusing to go away. However, the problem here is not with WordPress but with the Apache ModSecurity. The particular ModSecurity rule in question is 200003 …

Convert XLSX to a MySQL Table

October 14, 2021 – 11:49 am
7auipjfjec4veay7sa4hrw32xzg[1]

Some people find it hard to let go of Excel even when the situation is ripe for a database. And so dozens of different versions of the same spreadsheet edited by many people are floating …

Generating IP Whitelists

October 7, 2021 – 11:44 am
sonlxanvz0en50ijq03cedkaz2e[1]

I have several scripts that scan various log files for signs of suspicious activity and block the offending IPs on my Web servers – pretty standard stuff. The trick, of course, is not to block …

Plundering Facebook Photo Albums

September 30, 2021 – 11:42 am
wyryr1sn52gntzn65v4fpz5lc6v[1]

Let’s imagine you need to download all the photos in a Facebook photo album. It can be a public album, a friend’s, or even your own. Sure, you can do this manually, but you probably …

Scraping a Web Page in Bash

September 23, 2021 – 11:33 am
clfud46mxf2t5zph2l04zlpgl1d[1]

Just a scripting exercise because I need to do something important, but I am procrastinating. The idea is simple: grab some URL with text containing somewhat structured data and convert it into a spreadsheet. I …

Finding Cron Jobs

September 9, 2021 – 11:28 am
iwoau71okwxqh4jv3k4ook32qps[1]

Cron is an indispensable tool for system administration. The difficulties in working with cron in a large environment stem from its decentralized nature. Cron jobs multiply like rabbits, and keeping track of them is not …

Renaming Files with exiftool

September 2, 2021 – 11:25 am
b8g72yca7casi5shj7otypjbi20[1]

Recently I exported a whole bunch of files from Lightroom to a NAS share and filenames like 2E570434-67B7E0489CA2-39354-000017CF24DD8ACD.jpg are not very informative. It would’ve been nice if the filename contained some useful information like date, …

IP Geolocation from Shell

August 25, 2021 – 11:23 am
af1bc14559a18ce803edf27dd4638734[1]

A handy utility by Rafael Rinaldi called whereami allows you to geolocate an IP address directly from the command line. Here are some quick notes on installing and using this tool.