Browsed by
Tag: bash

Maven Version Plugin Automatic Updates

Maven Version Plugin Automatic Updates

Whenever you edit a Java/Kotlin maven project, you should see if you need to update any used libraries. For this purpose, I have a bash alias command which runs the next three statements in a row: The full alias line looks like this (in ~/.bash_aliased) Note: it seems the plug-in is not perfect 😉 Sometimes it does major updates, even if you ask it not to. So always carefully look at the changes which are made! The URL as used…

Read More Read More

Linux Emergency Reset / Shutdown

Linux Emergency Reset / Shutdown

I was always convinced that a Linux server would not easily break down or get stuck. However, after running an on-premise Kubernetes cluster for a couple of years, on non-optimal kernels or with non-optimal OS-packages on it, I have seen some quite severe issues. In some cases, a machine started logging lot’s of kernel panics, and then became slow and only partially functioning. In that state, typing sudo reboot often did not work. It would just time out on it,…

Read More Read More

Linux Sync Buffer Progress Monitoring (e.g. For Copy To USB)

Linux Sync Buffer Progress Monitoring (e.g. For Copy To USB)

On my Linux system (Linux Mint), if I copy a huge file to an USB stick, then I always type “sync” in a shell command line to make sure all buffers are flushed to the USB stick before I eject the USB stick. This writing of the buffers can take quite a while (perhaps due to the huge amount of cache memory in the laptop). To monitor progress, you can type the following in a shell: It will show something…

Read More Read More

Curl Command To Measure DNS And Network Timing

Curl Command To Measure DNS And Network Timing

The curl command line tool has a reporting option which you can use to measure different bits of timing in the network handling. This can be useful to monitor or investigate network issues: Example output: You can also insert \n’s in the option to put the result on multiple lines:

Check SSL Certificate Expire From Command Line

Check SSL Certificate Expire From Command Line

If you want to check SSL Certificate expires from the Linux command line, you can do that like this: (Of course replace the www.kaper.com by the host you want to check). Here’s a full example run: If you want to see some more details (for example to get a copy of the public certificates), use: Don’t have openssl client? And you do not want to install it locally? You can also run it in docker: Note: you can use the…

Read More Read More

Running CTOP in Docker

Running CTOP in Docker

CTOP is a nice command line tool to look at running Docker containers. To prevent from having to install the ctop binary locally, and always have the latest version, I do run it inside docker. For easy execution, I created a (Linux) bash alias: Just add it to your .bashrc (or some other file you load when opening a new shell, like ~/.bash_aliases). From then on, you can just type ctop as command line command, and it will launch the…

Read More Read More

Synology Universal Search CLI

Synology Universal Search CLI

The web-gui on a synology NAS has an application called “Universal Search”. I wanted to be able to use this from the shell command line on the NAS also to find my files, so I set out to find if that would be possible. TL;DR; See https://github.com/atkaper/synology-universal-search-cli for the end result. Or scroll down almost half way, till you find first mention of “synowebapi”. To use Universal Search, you first have to set it up using the web-gui, to index…

Read More Read More