It seemed a nice idea to create a little site with tips about various things using the .tips top-level domain. Here it is! A collection of tips from the Grumpy Old Techie.

August 26, 2017

UNIX - Use sed to edit files

sed is one of the commands that have been around forever on Unix systems. sed is a stream editor that you can use to perform basic text transformations on an input stream (a file or input from a pipeline). Want to use sed to edit a file in place? Well, to replace every ‘e’ with an ‘o’, in a file named ‘foo’, you can do: sed -i.bak s/e/o/g foo And you’ll get a backup of the original in a file named ‘foo. Read more

August 26, 2017

FREEBSD - Show open sockets

Most people know the netstat command to show you everything about the state of the network on your machine. You can also use sockstat to list all the open sockets on your system. Below are the sockstat options. sockstat -4 Show AF_INET (IPv4) sockets. sockstat -6 Show AF_INET6 (IPv6) sockets. sockstat -c Show connected sockets. sockstat -j jid Show only sockets belonging to the specified jail ID. sockstat -L Only show Internet sockets if the local and foreign addresses are not in the loopback network prefix 127. Read more

August 26, 2017

UNIX - Specify file and disk size output

If you want df, ls or du and other commands to display disk sizes in kilobytes instead of 512 byte blocks, set BLOCKSIZE in your environment to ‘K’. You can also use ‘M’ for Megabytes or ‘G’ for Gigabytes. If you want them to automatically select the best size then use df -h for example.

July 19, 2017

WSUS is not setup and forget

Windows Software Update Services provides a way for Windows sysadmins to control the distribution of updates to windows computers. It also helps to save a lot of bandwidth if you don’t have a superfast internet connection. Unfortunately many think that it is easy to setup and maintain. On newer version of Windows Server it is easy to setup but it needs a lot of care and feeding. I you want to run WSUS you will have to run the “Server Cleanup Wizard” at least once a month, or run Invoke-WSUSCleanup in a scheduled task. Read more

July 18, 2017

Don't post fake news

Before you post or share links on social media do all of us a favour and quickly fact check for fake news. URLs similar to is also a giveaway. In fact I would regard anything ending in .online or .info somewhat suspect.

January 1, 2017

Firewalls -block rather than scan

If you run a so called “New Generation Firewall” it will probably have an IDS/IPS system that scans all traffic. This eats a lot of CPU and slows down your firewall. There are lots of reliable lists (blocklists) of IP addresses out there that you can use to drop traffic from the bad guys before scanning, saving lots of CPU and increasing your throughput. Research the lists you plan to use, here is a good place to start your research: FireHOL IP Lists. Read more

December 20, 2016

If you don't like the soap you buy make your own

To make your own soap is really easy and you know exactly what is in it, unlike the stuff you buy at the store. Homemade soap is often much higher quality than store bought. Here is two links that will get you started. Run all soap recipes through one of the lye calculators you can find on these sites.

December 12, 2016

CPU info in FreeBSD

There are various methods to get CPU information on FreeBSD sysctl -a | grep -i cpu | less sysctl -a | egrep -i 'hw.machine|hw.ncpu|hw.model' “sysctl” retrieves the kernel state. You can also use dmesg to get the information: dmesg | grep -i cpu grep -i cpu /var/run/dmesg.boot

© Arnold Greyling 2020

Powered by Hugo & Kiss.