How To Fix Mouse Scrolls the Command Line History Instead of the Window Buffer in Terminal

Author: , May 23rd, 2023

In the macOS Terminal, my mouse scroll wheel would magically start scrolling the command line history instead of the window buffer scroll bar on the right to show window history. This happened when an SSH session was disconnected or timed out. The fix is to run the reset command.

How To Get A Reverse DNS Lookup On The Command Line

Author: , September 1st, 2021

There are three commands in Linux to easily get a reverse DNS lookup with: dig, host and nslookup. Here are examples of each: shell> dig -x +short

shell> dig -x

shell> host

shell> nslookup

Slick Command-Line Tricks for a Tungsten MySQL / MariaDB Database Cluster

Author: , July 16th, 2019

Tungsten Clustering provides high availability, disaster recovery, and a host of other benefits for MySQL / MariaDB / Percona Server databases. In this blog post we will explore some of the shell aliases I use every day to administer various Tungsten Clusters.

How To Test Nagios Remote NRPE Commands

Author: , September 27th, 2018

There are many things to configure in Nagios, especially when using custom check commands. Recently I needed to configure all of the Continuent Clustering Nagios checks. Once setup on the database side, I wanted to confirm that everything was working. Basics: Run a Remote NRPE Check To test a remote NRPE client command from a […]

How To get haproxy status via socket using cli

Author: , October 6th, 2017

echo “show stat” | nc -U /var/lib/haproxy/stats | cut -d “,” -f 1,2,5-11,18,24,27,30,36,50,37,56,57,62 | column -s, -t

How To Reduce the Size of a PDF Using Ghostscript

Author: , February 4th, 2017

Make sure you have Ghostscript installed, then:

-dPDFSETTINGS={value} where {value} is one of: /screen – the lowest resolution and lowest file size, fine for viewing on a screen /ebook – mid-range resolution and file size /printer – high-quality setting used for printing PDFs /prepress – high-quality setting used for printing PDFs As always, YMMV…

How To Send Email From the Command Line on MacOSX 10.10.5 Yosemite

Author: , January 29th, 2017

I wanted to send email from cron for various reasons, but the emails would bounce with an error 554: 554 5.1.8 : Sender address rejected: Domain not found Clearly, Postfix was using the “internal” hostname of myappledesktop.local (MacOSX has TWO hostnames! also, myappledesktop.local is not the real hostname ;-). So, I needed two things: 1. […]

How To Install a .pkg file from the Command Line on MacOSX

Author: , August 12th, 2016

sudo /usr/sbin/installer -pkg /path/to/yourFile.pkg -target /

How To Create a PDF from Multiple Image Files on the Command Line

Author: , June 6th, 2016

convert myFile*.jpg myFile.pdf convert myFile*.png myFile.pdf

How To Eject a Volume from the Terminal Command Line in MacOSX

Author: , December 8th, 2015

As always, YMMV…