Capture IP From PING

terminal

This is just a simple sed to capture IP address from ping. Note host must allow ICMP. This was tested on sh, bash and zsh. An example:

Docker Won’t Start After Update

I updated docker on CentOS 8 from docker-ce-3:19.03.13-3.el8.x86_64 to docker-ce-3:20.10.1-3.el8.x86_64 and failed to start after update. Oh no, now what? 🙂 Let’s see more details: Turned out the fix was to remove trusted.xml, or better […]

yum history

On RHEL/CentOS, yum history is not well-known but is a nice way to undo package installs, including dependencies, or updates. Usage is self-explanatory. I provided some examples below: If you really want you can undo […]

DNS Blacklist on WRT

Recently I found a forum entry with a script for blocking ad’s via DNS for WRT (or any other OS using sh and dnsmasq). However it was missing two features: a white list and a […]

Easy SSH On macOS

Using public key authentication for ssh is safer than password. But you should really use a passphrase protected private key. Now you are safe but you still need to type in your passphrase. This isn’t […]

Easy bond Interface

If you ever set up a bond interface on Linux you know it takes a few file editing. I got tired of doing this, please find my script below creating a bond interface. This is […]

Delete a Single Line From History

Did you ever wanted to remove a single line from your shell history? This is how you can easily do it: use: history -d line number to remove the line, for example history -d 431, […]

net-snmp Logrotate On CentOS

It turns out be defult net-snmp doesn’t come with logrotate for CentOS 7. However is quite simple to be done. All you have to do create a the following file: /etc/logrotate.d/snmpdlog and add the content […]