Undistract: An Attention Watchdog

I’m posting my distraction defeating program undistract today and wanted to explain how it came about and why I find it useful.


Bash Output Redirection

I know that doing this:

foo 2>err.log > log

will capture the output to stderr and stdout.

I was just trying to redirect ALL the output to a single file. I thought this would work:

foo 2>&1 > log

But for some reason the stderr stuff was still being output to the console.

Luckily the top result in Google led me straight to the answer: To send all output to a file, use &>

foo &> log

My Backup Solution

For my first post I’m going to document the backup solution I use on my web server.

The backups happen in two parts: