Restoring your PATH on MacOS

The inevitable happened and while adding/removing some utils to my path, I messed up my .bash_profile and ended up with a PATH where I couldn’t run any commands.

To recover, the default PATH on MacOS should be:

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

From here.

Getting status from dd when writing disk images on MacOS

dd is a pretty useful tool for creating and writing disk images from a source to a destination, for example writing disk .img files to SD Cards for your Raspberry Pi (see here, and here).

The trouble is if you’re writing images that are several GB that can run for 20mins or so, you don’t get any feedback on the progress until it’s complete. Well turns out if you send a ‘kill -INFO’ signal to the PID of the process, it will output the current status of bytes written and bytes remaining. Found this tip here.