If you don't agree with me now, just wait five years.

Obscure Linux Commands: Random Little Stuff

Date/Time Permalink: 12/12/07 09:13:41 pm
Category: HOWTOs and Guides

Blaugh, I'm going to be one tired, burned-out blogger for the rest of the month. My paid writing work currently is to write a ton of content about the upcoming 2008 US presidential election. happy. happy. joy. joy. It's a ghost-writing gig, so don't ask where and who - and if you saw it out there, you'd never recognize it was me. I have to maintain the utmost editorial integrity and be neutral and boring, when what I really want to do with this three-ring circus of an election is put on my gonzo hat, snack my way through the medicine cabinet, and channel the spirit of Hunter S. Thompson to write Fear and Loathing on the Campaign Trail in 2008: Pray for the Flying Saucers to Kidnap Us!

Oh well, I'll leave the political blogging to people like Wonkette, who's doing a good job in my place. Meanwhile, for FOSS blogging I have to fall back on the vault. And the vault today is half-portion scraps and left-over doodles. But hey, here's some CLI Linux commands that I bet you're never typed in!

ddate - No, not the well-known "date" command, but DDATE, the not-so-well-known-before-now Discordian date. Today, as I publish this, it is "Sweetmorn, the 54th day of The Aftermath in the YOLD 3173". If you've ever seen a Linux/Unix system cough up a line like this - Tom's root-boot floppy leaps to mind like a monkey wot sat onna tack - this is the program that it comes from.

units - The units command converts between units. Isn't that interesting? No? Well, this is an impressive command anyway, because it is the Bertie Bott's Every Flavor Beans of unit conversion programs. Check out Linux and Things for a heart-warming units story. He used it to convert between two physics things, the nature of which I haven't the fuzziest notion.

quiz - This comes with bsd-games - easy to find and install if you don't have it. It is a very simple trivia game - it gives you one half of a pair, you supply the other half. Latin/English will give you the word in one language to answer with the other, victim/killer will give you pairs of names from famous homicides to pair up, and so on. The nifty part of this is that the quiz files are in plain text in /usr/share/games/quiz/. Once you get the hang of quiz and browse the files, it's easy to write your own quizzes. A trivia buff should love it.

setleds - Really, this is only useful for hacky sysadmin types. This command sets the little green lights on your keyboard automagically. "setleds +scroll" will turn on the Scroll-Lock light, "setleds -scroll" will turn it off. Other options on the man page.

Now, you're saying to yourself, "How utterly useless!" But you haven't thought of the scripting possibilities yet. What if you leave the PC and come back - would you like a light to pop on when you have new mail, so you see it when you get back? How about setting a sequence to let you know when a compile job finishes? Maybe a secret code that will blink on to let you know that somebody tried unsuccessfully to crack root? Have the light stay steady, but flip off if a ping script detects that your website is down?

Ah, now you get it! The only downside is that it has to run from the console (NOT a desktop terminal). But that's OK, you can script from the console, too. And you finally have a use for Scroll-Lock!

rain - An ancient console program. It's an ASCII rain animation! Stop it with Control-C.

...

Well, that's it for that post. I promise to do better next time.

the Linux shield

Follow me on Twitter for an update every time this blog gets a post.
Stumble it Reddit this share on Facebook

suddenly the moon