Ben Hamilton

Encrypt and decrypt .zip files on Mac OS X

I just needed to compress and encrypt some files on Mac OS X. The following command does that: zip -ejr TARGET SOURCEFOLDER This will ask for a password (twice to confirm it), encrypt and compress the sourcefolder and put it into a file named target (and auto add the .zip extension). To unzip it do […]

Posted in *nix | Tagged , , | Comments Off on Encrypt and decrypt .zip files on Mac OS X

10 Terminal Commands That Will Boost Your Productivity

10 Terminal Commands That Will Boost Your Productivity. Discusses touch, cat, less, curl, tar, gzip, chmod, diff, patch, sudo, man, shutdown, !! and !$. Linux, OSX, Windows.

Posted in How to | Tagged | Comments Off on 10 Terminal Commands That Will Boost Your Productivity

How to find your external ip address from the command line

I often need to know what the external IP address for a client is. Thus I’ve cobbled together the following script. Simply copy the code below into externalip.cmd and when run from the command prompt it will do two things for you: the script will display the external IP address the script will set the […]

Posted in How to, Microsoft | Tagged , , | Comments Off on How to find your external ip address from the command line

Reading the Registry from the Command Line

Often I need to check windows registry values, for example, to see if an addon is working. From the Microsoft Windows command line (Start | run | cmd) it is easy to see what value a registry key has: REG QUERY “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\MS Project\Addins\Mindjet.Mm8MsProject.AddIn.4” /v “LoadBehavior” In this example above, we see if the Mindjet Mindmanager […]

Posted in How to, Microsoft | Tagged , | Comments Off on Reading the Registry from the Command Line

Using registry values in scripts

I’m often writing scripts to do stuff. It makes my job easier. I’ve often wanted to be able to script the discovery of registry values in the Windows Registry. Thus here is a short example on using the vanilla windows command line to find the value of a Windows registry key. From my testing these […]

Posted in How to, Microsoft, Windows | Tagged , , , , | Comments Off on Using registry values in scripts