*nix Tip of the Day: Unix Time

Posted Sun 06 March 2011 21:43 under category tips

As the unix-savvy among you probably know, there is One True Way to tell the time: the number of seconds elapsed since midnight on January 1, 1970 +0000. It's an extremely convenient way for computers to represent the time, since it's just an integer that goes up. There's no parsing to be done, and arithmetic is just regular math. If you want a brain-numbingly-detailed overview, Wikipedia's article on unix time is, as usual, sufficient.

However, what I'd like to talk about here is converting back and forth between unix time and meatware time. I imagine ...

read more

Linix Tip of the Day: SystemTap

Posted Wed 16 February 2011 09:08 under category tips

The other day, one of my co-workers, Evan, presented an interesting problem to me. Every day, at some point, a file named ] gets created in his home directory. He assumes that it is being created by a script with a typo in it... somewhere. But how to find out? It's a hard thing to grep for.

My initial solution was to use inotify (which you might remember from a previous post) combined with libnotify to alert him if it happens while he was at his computer. It looked like the following:

$ inotifywait -t 0 --exclude='.*[^]]$' $HOME && notify-send "something just ...
read more

*nix Tip of the Day: Waiting in Scripts

Posted Sat 04 December 2010 16:22 under category tips

Scripting is what makes Unix-like operating systems great. Every *nix, be it Linux, BSD, OS X, AIX, Solaris, or whatever other random distribution you can come up with, comes with a capable shell (or three) and a good set of basic utilities. Where a Windows administrator has to either fall to the horror that is Batch files, write code in a big, heavy programming language language, or submit to the terrible dominance of “management utilities”, a Unix system administrator has tons of the tools at his disposal to fix and automate things. I could talk about scripting forever (it is a substantial portion of my job), but today I'm just going to talk about one small facet: waiting for things to happen.

read more

Dynamic DNS: Part Two

Posted Mon 15 February 2010 23:18 under category tips

Bonjour This post is a follow-up to Dynamic DNS

When last I left you, we had basic updateable DNS running and could update it from OS X. I've been a bit busy since then, but thanks to some prodding from @Loredo, I got back in and started looking at. What follows is the exciting story of how I got things up and running -- by the end of this post, you'll have access to a working copy of dnsextd for linux, and a client application that updates SRV and IP (A/AAAA) leases. Woo.

read more

*nix Tip of the Day: Dynamic DNS

Posted Fri 18 December 2009 16:29 under category tips

Bonjour logo

It's nice to have DNS records for all of your computers. It's a giant pain in the ass to remember IP addresses, especially if you're on something like a cable connection, where the IP address is dynamic (but only changes every month or two). Now, you could go ahead and use DynDNS or No-IP or something. But those are lame. You have to use a subdomain of one of their domains, and you have to use their software to update. You might be wondering if there's a better way. Well, there is. Standard DNS supports updating, it turns out. In BIND, this is managed through the allow-update parameter. I had some free time this week after I finished finals, so I went ahead and set it up, along with the other trimmings required for Wide-Area Bonjour. It's cool, so I thought I'd post a bit.

The most important resource for all of this stuff is dns-sd.org. Aside from a couple of minor errors that I corrected and an update for OS X 10.5+, this Tip will be based off of the guides from that site. So credit to them.

read more

*nix Tip of the Day: VMS

Posted Sun 29 November 2009 17:01 under category tips

Okay, so this is maybe a little unusual, but today's "*nix Tip of the Day" isn't about Unix/Linux/etc. at all. Instead, it is about their antiquated archenemy: VMS. First, a little bit of history:

History

Way back in 1970, the PDP-11 was hot stuff. Ken Thompson, Dennis Richie, Brian Kernighan, and others at Bell Labs were writing what would become Unix for the PDP-11 (well, for the PDP-7 at first, but nobody talks about that). Unix was a huge improvement over what DEC shipped with the PDP-11, DOS-11 and RT-11. This couldn't stand, so Dave Cutler at DEC designed VMS. It was a new operating system, with lots of fancy features, like networking and, uh, lots of upper-case letters.

VMS and Unix sort of battled on. Or so some people would have you think. Really, Unix won early on and VMS stumbled along with corporate financing and an obnoxiously difficult-to-use interface. It passed from DEC to Compaq to HP, from the PDP-11 to the Alpha to the Itanium. And it still lives on, churning away in scary back-rooms here and there.

Current Events

So, why do I bring this up? Well, as some of you may know, Harvey Mudd College has a few VMS machines around. The most well-known of these (to students) is thuban, which is a 667MHz DEC Alpha running OpenVMS 7.3-2. Today, I had the, uh, interesting experience of using it, and thought I'd share my impressions with my readers. You can see the proof of my VMS skills at my VMS homepage. That's right, I'm on the Internet. And on DECnet.

read more