The problem# In a shell script, I wanted to use inotifywait's --monitor option to watch for changes to files, but I didn't care how many changes had been made, only whether or not changes had been made. I wanted to use --monitor as if more changes where made later, I still wanted to get notified...
The problem# In recent weeks, there were multiple Linux security bugs discovered, "copy fail", "dirty frag", and "PinTheft", which all involve a kernel module that most people were not using but an attacker could load and then exploit. Naturally, a common response was to talk about ways to limit...
The problem# I had a script where at some point a program I did not directly control would create a file, but I wanted that file's permissions to be different than those it got created with. The simple solution was to run chmod in a loop waiting for it to succeed with a short sleep delay between...
The problem# For a compile-on-save workflow where some computation is done in response to every change to a file, if there may sometimes be many changes close together, it may be wasteful to respond to all of them. This is often handled by debouncing the events: instead of responding to every...
The problem# I was running a Factorio multiplayer server and was being paranoid about making sure I didn't lose any save data. But I also didn't want to put the saves directory on my ZFS file system as it's on a hard drive, not an SSD, and saves taking too long can cause lag for the players...