Author:
erics, 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.
Categories: How-To's, Technology Tags: apple, bash, cli, Command line, Disconnect, History, howto, MacOS, Mouse, Scroll, Shell, ssh, Terminal, Timeout, tips
|
No comments
Author:
erics, 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 3.214.2.238 +short
shell> dig -x 3.214.2.238
|
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.68.rc1.86.amzn1 <<>> -x 3.214.2.238 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19300 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;238.2.214.3.in-addr.arpa. IN PTR ;; ANSWER SECTION: 238.2.214.3.in-addr.arpa. 300 IN PTR ns3.wyzaerd.info. ;; Query time: 8 msec ;; SERVER: 10.0.0.2#53(10.0.0.2) ;; WHEN: Wed Sep 1 19:43:56 2021 ;; MSG SIZE rcvd: 72 |
shell> host 3.214.2.238
|
238.2.214.3.in-addr.arpa domain name pointer ns3.wyzaerd.info. |
shell> nslookup 3.214.2.238
|
Server: 10.0.0.2 Address: 10.0.0.2#53 Non-authoritative answer: 238.2.214.3.in-addr.arpa name = ns3.wyzaerd.info. |
Categories: How-To's, Technology Tags: cli, Command, Command line, dig, dig -x, DNS, Host, howto, lookup, nslookup, Reverse, Reverse DNS, tips
|
No comments
Author:
erics, 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.
Categories: Mastering Tungsten Clustering, Monitor Tags: Aliases, bash, cli, Command, Command line, HA, High Availability, monitoring, mysql, Tungsten
|
Comments Off on Slick Command-Line Tricks for a Tungsten MySQL / MariaDB Database Cluster
Author:
erics, 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 […]
Categories: How-To's, Technology Tags: cli, Clustering, Command, Command line, Continuent, Disaster REcovery, DR, HA, High Availability, howto, mysql, nagios, NRPE, Test, tips
|
No comments
Author:
erics, 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
Categories: How-To's, Technology Tags: cli, Command, Command line, haproxy, howto, Linyx, proxy, socket, Status, tips
|
No comments
Author:
erics, February 4th, 2017
Make sure you have Ghostscript installed, then:
|
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS="/ebook" -sOutputFile=output.pdf input.pdf |
-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…
Categories: How-To's, Technology Tags: Adobe, cli, Command line, Ghostscript, gs, howto, Linux, macosx, PDF, Reduce, Resize, Smaller, tips
|
No comments
Author:
erics, 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. […]
Categories: How-To's, Technology Tags: 10.10.5, Bounce, cli, Command line, Email, FQDN, howto, macosx, mail, main.cf, PostFix, Send, tips, Yosemite
|
No comments
Author:
erics, August 12th, 2016
sudo /usr/sbin/installer -pkg /path/to/yourFile.pkg -target /
Categories: How-To's, Technology Tags: apple, cli, Command, Command line, howto, Install, installer, macosx, OSX, Package, pkg, sudo, Terminal, tips, Yosemite
|
No comments
Author:
erics, June 6th, 2016
convert myFile*.jpg myFile.pdf convert myFile*.png myFile.pdf
Categories: How-To's, Technology Tags: cli, Command line, convert, howto, IM, ImageMagick, JPG, Linux, PDF, PNG, tips
|
No comments
Author:
erics, December 8th, 2015
As always, YMMV…
|
#!/bin/bash # Usage: eject [fullpath to mount point] DISK="${1:-/Volumes/YourUSBFlashDriveName/}" df -h "$DISK" > /dev/null 2>&1 if [ $? -eq 0 ]; then diskutil unmountDIsk `diskutil list "$DISK" | grep ^/dev/` else echo Volume $DISK is not mounted...skipping. fi |
Categories: How-To's, Technology Tags: apple, bash, cli, Command, Command line, Disk, diskutil, Drive, eject, Flash, howto, List, Mac, macosx, mount, Terminal, tips, umount, unmount, unmountDisk, USB, volume
|
No comments