week 16, 2019

How to use jq in a shell pipeline

If you use the identity filter, '.', you can pipe output of a command to jq, a lightweight and flexible command-line JSON processor, and have it pretty printed. For example:

curl -s | jq '.'

The above will show information about your current (external) IP address, similar to

For more information about jq, see the jq Manual.

Mudan flowering

Mudan (Paeonia suffruticosa) flowering
Mudan, Paeonia suffruticosa, flowering.

Yesterday, I used the PlantSnap app on my iPhone 5 to identify a flowering bush growing in my mother's garden. The program suggested that it was a Paeonia suffruticosa. Today the flower I took a photo of yesterday was more open so I took another photo for this blog.

Refactoring tumblelog

This morning I refactored the Perl version of tumblelog because I wanted to add next and previous links to the day pages. Yesterday, I had done some brainstorming and I concluded that quite a rewrite was required, which was indeed the case.

In the evening I modified the Python version based on the new Perl version. Both versions are available on GitHub.

Making a backup on OS X

After I had unpacked the Western Digital My Passport I used Disk Utility on OS X to erase and format the drive as "OS X Extended (Journaled)".

Erasing and formatting a drive using Disk Utility
Erasing and formatting a drive using Disk Utility on OS X "El Capitan".

Next, I selected the drive in Finder, selected "Get Info", unlocked the settings at the very bottom and turned "Ignore ownership on this volume" off.

Ignore ownership on this volume disabled
"Ignore ownership on this volume" disabled after unlocking.

Finally, I used rsync in the terminal as follows

sudo rsync -avh /Users/ \

to start a complete backup of all Users data on the brand new Western Digital harddisk named Orange.

Transfer speed of a WD My Passport 2TB drive

When done with the backup of my OS X "El Captain" /Users/ directory the rsync command reported a transfer speed of 34.72M bytes/sec for the WD My Passport 2TB drive (output reformatted to fit):

sent 788.46G bytes
received 13.34M bytes
34.72M bytes/sec
total size is 788.81G
speedup is 1.00