The Power of the Command-Line

Ok, firstly, I want you to imagine (if you will) Darth Vader saying the title of this blog post: “The Power of the Command-Line”. Good, good (– The Emperor).

I suppose I’d better go and explain that now… the title, that is, not Darth Vader. I just thought it would be cool if Darth Vader said it. Anyway. I was thinking the other night how cool Linux was. I was downloading a relatively large file, and I wanted to go to bed. Some download managers interface with the Operating System which gives you the option of turning the computer off once you’ve finished downloading, but I was using Firefox which doesn’t have that option. If I’d been using Windows, my options would have been (1) staying up until the file had downloaded, (2) leaving the computer on all night. Neither of which were particularly desirable.

Thanks to Linux, I had a third option: use the ‘at’ command to turn the computer off at a specified time. I just dropped to a terminal window (basically a command line interface) and typed in:

[phill@dibber ~]$ su
Password:
[root@dibber phill]# at midnight
at> shutdown -h now

I could then walk away from the computer, in the knowledge that my computer would shut itself down at midnight, after the file had finished downloading! Ok, so, there was a small chance the file wouldn’t have finished downloading (if it suddenly went really, really slow) — but still. That’s the kind of power which you have from the command-line in Linux 🙂 There probably is a way of getting it to shutdown once the file has completed downloading, I just haven’t figured it out yet.

‘at’ sets up a ‘job’ to run once… ‘cron’ sets up jobs to run repeating. I’ve already mentioned this in a previous blog post, but you can use it to keep your machine up to date. Can you use Windows Update from the command-line? I’ve never seen it!

This is why Linux suits itself so perfectly to servers – you can set it up to basically maintain itself! Although Microsoft have done a great job in Windows of making it easy to use, I think it does require a lot of user input. Even with Windows Server 2003, I’ll login to a machine and see messages saying that Windows has downloaded updates for the computer which require a reboot… why should we have to reboot the machine? It’s just symptomatic of the cowboy attitude Microsoft have taken to security and patching in the past which… (Phill wanders off into the sunset, ranting under his breath)


Comments

7 responses to “The Power of the Command-Line”

  1. Neat little feature, that. Technically I expect that’s possible on my computer too, since OS X has a UNIX terminal too. I’ve heard of several *NIX boffs who manage to do really clever things with Macs having never used one before, leaving most Mac-savvy people staring in wonder saying “how did you do that???” Incidentally, I know near to nothing about command line stuff, so I’ll leave that sort of thing to you, Phill!

  2. You should try and get into it, Matthew – the command line is a very useful thing! It’s worthwhile knowing even if you only use it occasionally, it can really help out in some situations where otherwise you’d be tearing your hair out (well, maybe not quite that bad, but some situations can be solved much more easily through the command line than from a GUI).

  3. Rambling into the sunset? Sounds like something I’d do. And yes, I believe there’s a similar thing on iMacs. My cousin found it on his though, and he’s much better with programming things than me. The geekiest thing I can do is bold, italic, and underline (as vell as de obvious vuns like “br” (in tag-ness though) and links) in HTML, which is like, 7th grade computing. But yeah, I was going to find that program and see what it was called, but I forgot what it was called and therefore couldn’t find it. Tootles.

  4. Well, even HTML is indecipherable to some people, so you’re not doing too badly Catlin!

    Incidentally, I’m afraid I have to say this: someone else has commented on my blog other than the regulars? Twice in the past week?! OH MY WORD, DOOMSDAY IS NEAR!!! *ahem* Thanks, I just needed to do that. As you were.

  5. ????????????????????????????????????????????????????????????????

    Does confusion come as standard with old age?

  6. ‘Friad so Joe!

  7. Yeah I’m finding that it is possible to automate all number of things using the command line, much more fun than constantly clicking through all the same menus all the time.

    “Neat little feature, that. Technically I expect that’s possible on my computer too, since OS X has a UNIX terminal too.”

    While OS X beats Windows XP at more or less everything; I have to admit that I do not always like the Mac interface compared to Gnome; having the open but minimised applications mixed together with unopened applications can really confuse me sometimes. I know there are little marks but it can take a few seconds to look for it.

    However, the Mac command line is fantastic, with a few tweaks it can be as good as Linux, (it is basically FreeBSD anyway). The Mac terminal is well worth adding to your dock.

    If I can (cheekily) feed you my own dog food, I have written about how to get going with the Mac OS X command line on my blog.

    If I ever had money to buy a new laptop, I would certaintly consider a Mac, the hardware is beautifully designed and it will run Gentoo!

Leave a Reply

Your email address will not be published. Required fields are marked *

Related posts

Get new posts by email