Linux: How to read through all files (checking a backup)

After finishing a backup to a USB stick, I like to verify that all is in place by reading through all files. Using the “tar” utility with verbose file output seemed to be a good idea. But… Don’t $ tar -cv . > /dev/null For whatever reason, the files aren’t really read. Only the names [...]

bash: Jots on exiting the script

Trapping Call a function (byebye in this case) just before exiting a script: trap byebye exit Or a command: trap ‘echo “Farewell cruel world!”‘ exit It’s possible to catch various signals with “trap” as well. Quit on error In short: Have a set -e at the beginning of the script. It’s a global on-off feature, [...]

overlayroot (and permission issues) on Linux Mint 18.1

Introduction Wanting my media center computer to maintain consistent behavior and be tolerant to sudden power outages, I looked for a way to have the root filesystem read-only. This can cause problems with programs that expect to write to all kind of files allover, and media related software has this tendency to break when things [...]

Wallpaper / desktop background + other stuff on Linux Mint 18.1 / Cinnamon

Desktop wallpaper setting Get the current one: $ gsettings get org.cinnamon.desktop.background picture-uri ‘file:///usr/share/backgrounds/linuxmint/default_background.jpg’ And set it to another: $ gsettings set org.cinnamon.desktop.background picture-uri ‘file:///usr/share/backgrounds/linuxmint/edesigner_linuxmint.png’ Notes: The “file://” prefix is mandatory. There also an org.gnome.desktop.background attribute. Apparently, org.cinnamon.desktop.background overrides the former. For an effect on the screen, the “set” command must be run on the active [...]

Linux Mint 18.1 + i915: Updating the Intel Graphics stack

Running Linux Mint 18.1 (kernel 4.4.0-53) on a Gigabyte Brix BACE-3160 (with an i915 graphics controller) , I had all kind of minor graphics artifacts (in particular a sluggish mouse pointer and Kodi felt heavy). So obviously, I went for updating the graphics stack. Intel supplies an tool for doing this automagically on a selected [...]

Script for fixing a lot of git tags

I needed to update a lot of releases, each designated by a tag, with a single fix, which took the form of a commit. This commit was marked with the tag “this”. #!/bin/bash for i in $(git tag | grep 2.0) ; do git checkout $i git cherry-pick this git tag -d $i git tag [...]

My golden Makefile for compiling single-file C programs

This is the Makefile I use for compiling a lot of simple utility programs, one .c file per utility: CC=    gcc FLAGS=  -Wall -O3 -g ALL=    broadclient broadserver multicastclient multicastserver all:    $(ALL) clean: rm -f $(ALL) rm -f `find . -name “*~”` %:    %.c Makefile $(CC) $(FLAGS) $< -o $@ The ALL variable contains the [...]

Password-less SSH remote login demystified

This is documented everywhere, and still, I always find myself messing around with this. So once and for all: The files In any user’s .ssh/ directory, there should be (among others) two files: id_rsa and id_rsa.pub. Or maybe with dsa instead of rsa. Doesn’t matter too much. These are the keys that are used when [...]

Linux Malware Detect for occasional non-root use

Intro This is a minimal HOWTO on installing Linux Malware Detect for occasional use as a regular non-root user. Not that I’m so sure it’s worth bothering, given that contemporary exploit code seems to be able to go under its radar. Background One not-so-bright afternoon, I got a sudden mail from my web hosting provider [...]

LVM volume resizing jots

These are my jots as I resized a partition containing an encrypted LVM physical volume, and then took advantage of that extra space by extending a logic volume containing an ext4 file system. The system is an Ubuntu 14.04.1 with a 3.13.0-35-generic kernel. There are several HOWTOs on this, but somehow I struggled a bit [...]