How to Find the Time Between two Unix Time Stamps

This article explains how to find the time interval between two Unix time stamps. The default time format in Unix is like this: “Sun 9 Aug 12:50:08 BST 2020”. It appears in many places on the system and is the default produced by the “date” command.

For example, it might appear in application log files, like this::

Start time: Sun 9 Aug 10:05:00 BST 2020
End Time:   Sun 9 Aug 12:51:12 BST 2020

This article explains how to subtract one time from the other in Bash, and obtain the intervening time in seconds.

Continue reading

Large files / small backups on Debian LAMP

Backups on a LAMP server were much smaller than expected, and the cause was excessively large log files. This post explains the apparent paradox and the steps taken to trace and fix the problem.

The server in question runs the usual set of grandfather-father-son backups. Before each backup, the software prints the expected size of the backup into a log file. On other servers the estimate is usually bang-on. On this server, the backup turned out to be about 12 times smaller than the estimate. Not a problem in itself, but puzzling and indicative of something untoward on the system. Continue reading