Using conditions to string together multiple *nix commands

I’m in the process of copying 30gb of data from one remote server to another and, only after I initiated the process did I think “Geez, it’d be nice to have a way for the system to notify me when the copy process completes so I don’t have to feel like I have to monitor it as it’s in-progress.”

Of course, TextBelt came to mind as an ideal way to do this and a quick Google search returned some great info about “bash operators/separators.”

  • | pipes the output of the left-side command as input for the right-side command
  • && executes the right-side command only if the left-side command completes successfully
  • || executes the right-side command only if the left-side command fails
  • ; executes the right-side command whether or not the left-side command completes successfully

So, in my current situation, I could’ve benefitted from something to the effect of:

scp -r <localDir> <userName>@<destinationSvr>:<destinationDir> && \
curl -X POST http://textbelt.com/text \
-d number=<phoneNumber> -d "message=scp complete."

Read More

A quick update

12523173_950913208335202_9114545122296586032_nI haven’t posted anything new here for a few weeks now but it’s not for lack of wanting to – I have a few long form blog posts in-progress but I’ve also been busy with my new podcast, Geek Tangent.

We just released our third episode (in which we discussed the Apple/FBI case, our experience with wearables and made some podcast recommendations) and episode #4 was just recorded for release this coming Monday.

Stay tuned: new posts coming soon!

Read More

Free, trusted SSL certificates

SSL-padlockSSL certificates, in case you don’t already know, are the mechanism by which one can secure the connection between a user and a web site – they are the “keys” to establishing a secure connection between the endpoints so that transmitted data can’t be intercepted.

As someone who’s frequently spinning up Linux VMs to use as servers to provide services to my users, I have to be concerned about such security in instances where the services will be accessed by the outside world. Typically, I’ll simply generate a self-signed certificate from the server itself which, while providing security, also means that the user has to cope with the browser-generated security warning every time they visit the site.

(more…)

Read More