Articles in SysAdmin
Awk & sed Snippets for SysAdmins
![Awk & sed Snippets for SysAdmins 8vl3onvznkopxa6ny9995yrc4gw[1]](https://i0.wp.com/www.krazyworks.com/wp-content/uploads/2021/10/8vl3onvznkopxa6ny9995yrc4gw1-150x150.jpg)
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 …
Synology NAS Hacks
![Synology NAS Hacks rhd3hj6zvnqeth7qo8em0alduj0[1]](https://i2.wp.com/www.krazyworks.com/wp-content/uploads/2021/10/rhd3hj6zvnqeth7qo8em0alduj01-150x150.jpg)
I’ve been using various Synology NAS devices for many years now, and they’re great. Well, almost. There are a few rough spots that don’t thrill me. These consumer-grade devices are designed to be difficult to …
Finding Duplicate Photos
![Finding Duplicate Photos 9dwz62kvm0gtjya9kwb7pawtk9y[1]](https://i2.wp.com/www.krazyworks.com/wp-content/uploads/2021/10/9dwz62kvm0gtjya9kwb7pawtk9y1-150x150.jpg)
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
![Collatz Conjecture in Bash 5o2y78yvwlg2lfep7d8fnznsnr3[1]](https://i0.wp.com/www.krazyworks.com/wp-content/uploads/2021/10/5o2y78yvwlg2lfep7d8fnznsnr31-150x150.jpg)
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
![Simple Math from Bash Command Line e4126w5dkl69jw9cm2xj39j8pba[1]](https://i1.wp.com/www.krazyworks.com/wp-content/uploads/2021/10/e4126w5dkl69jw9cm2xj39j8pba1-150x150.jpg)
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
![Focus Stacking with Lightroom and Photoshop zxulfg358ydpeyelfjppawbkxhr[1]](https://i0.wp.com/www.krazyworks.com/wp-content/uploads/2021/10/zxulfg358ydpeyelfjppawbkxhr1-150x150.jpg)
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 …
Generating Honeypot Data Structure
![Generating Honeypot Data Structure on7avnij18ozm2jvppgdny2lhlv[1]](https://i0.wp.com/www.krazyworks.com/wp-content/uploads/2021/10/on7avnij18ozm2jvppgdny2lhlv1-150x150.jpg)
I’ve been fiddling with my inotifywatch scripts to make a better “early-warning” system for ransomware detection and realized I needed a more realistic honeypot data structure. Ransomware is getting more clever and is no longer …
Peculiar Linux Command-Line Tools
![Peculiar Linux Command-Line Tools 9yap7otat457ctjm63g78ann8mv[1]](https://i2.wp.com/www.krazyworks.com/wp-content/uploads/2021/10/9yap7otat457ctjm63g78ann8mv1-150x150.jpg)
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
![NFS I/O Stats with Logging tq9mhhd5xy2q0kto2j1785n6odv[1]](https://i1.wp.com/www.krazyworks.com/wp-content/uploads/2021/10/tq9mhhd5xy2q0kto2j1785n6odv1-150x150.jpg)
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
![Inventorying NFS Mounts and Mount Options 4ucne6vs8m7hqdl0el9ddqd1sql[1]](https://i2.wp.com/www.krazyworks.com/wp-content/uploads/2021/10/4ucne6vs8m7hqdl0el9ddqd1sql1-150x150.jpg)
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 …
Automatic File Backups in VIM
![Automatic File Backups in VIM bqlpzjqba7fn1jtghunz0z1vv5d[1]](https://i2.wp.com/www.krazyworks.com/wp-content/uploads/2021/10/bqlpzjqba7fn1jtghunz0z1vv5d1-150x150.jpg)
Having to undo stupid changes to config files is an unfortunate side effect of too few sysadmins supporting too many servers. The VIM editor has some built-in file backup options. However, I find these options …
Joining Text Files and Data Columns
![Joining Text Files and Data Columns p65q1znipa66jngo3jjvbnmb7s7-scaled[1]](https://i1.wp.com/www.krazyworks.com/wp-content/uploads/2021/08/p65q1znipa66jngo3jjvbnmb7s7-scaled1-150x150.jpg)
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
![Convert Color Text to Images in Bash uw4wrbh91igtkstbw6zr43yc5my[1]](https://i1.wp.com/www.krazyworks.com/wp-content/uploads/2021/08/uw4wrbh91igtkstbw6zr43yc5my1-150x150.jpg)
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
![Solving Crossword Puzzles from CLI jddujk6sil1frr05tgusp596m0x[1]](https://i0.wp.com/www.krazyworks.com/wp-content/uploads/2021/08/jddujk6sil1frr05tgusp596m0x1-150x150.jpg)
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
![Productivity Shortcuts for .bashrc q3rkytdeesvavynm5bf9l8ejk6m[1]](https://i1.wp.com/www.krazyworks.com/wp-content/uploads/2021/08/q3rkytdeesvavynm5bf9l8ejk6m1-150x150.jpg)
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
![Decision Making Using Python TOPSIS 96wed5sso8yxby9c0qj83cnkh6s[1]](https://i1.wp.com/www.krazyworks.com/wp-content/uploads/2021/08/96wed5sso8yxby9c0qj83cnkh6s1-150x150.jpg)
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
![Using Variables in Bash 7svf2cvkbbkpa19u2ja8d98dnt8[1]](https://i2.wp.com/www.krazyworks.com/wp-content/uploads/2021/08/7svf2cvkbbkpa19u2ja8d98dnt81-150x150.jpg)
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
![WordPress: Post-processing of the image failed ytioq398kc1wnvvz95uixhcn5ii[1]](https://i2.wp.com/www.krazyworks.com/wp-content/uploads/2021/08/ytioq398kc1wnvvz95uixhcn5ii1-150x150.jpg)
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 …
Clone Raspberry Pi SD to Larger Card
![Clone Raspberry Pi SD to Larger Card kfji8o9kkwlt04vbdlf0jbczy9q[1]](https://i0.wp.com/www.krazyworks.com/wp-content/uploads/2021/08/kfji8o9kkwlt04vbdlf0jbczy9q1-150x150.jpg)
This is more of a note to myself: every time I need to clone the RPi card, I end up googling things for an hour. The process is two-fold: clone the SD and resize the …
Laziness vs Phishing
![Laziness vs Phishing 43v0r4nyow1rbpxrr6gunkcbfcj[1]](https://i2.wp.com/www.krazyworks.com/wp-content/uploads/2021/10/43v0r4nyow1rbpxrr6gunkcbfcj1-150x150.jpg)
Here’s an interesting article detailing the methods scammers use to steal your one-time passwords for Coinbase.
A Wrapper Script for unrar
![A Wrapper Script for unrar 53wmyx6na9379un1mmku8ibq6x6-2[1]](https://i0.wp.com/www.krazyworks.com/wp-content/uploads/2021/08/53wmyx6na9379un1mmku8ibq6x6-21-150x150.jpg)
Just a straightforward wrapper script for the unrar command that allows extracting specified filetypes from multipart archives while utilizing all available CPU cores.
Convert XLSX to a MySQL Table
![Convert XLSX to a MySQL Table 7auipjfjec4veay7sa4hrw32xzg[1]](https://i0.wp.com/www.krazyworks.com/wp-content/uploads/2021/08/7auipjfjec4veay7sa4hrw32xzg1-150x150.jpg)
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 …
Latest Comments