Warning this article may contain opinions of the author that you and iTWire don't agree with.
Visit the last page to have your say in our forum.

No. 1 Story

Telstra adds one million mobile services, but Sensis plummets

Telstra has revealed the addition of almost one million new mobile services in the six months to December 2011, but Sensis revenues plummeted 24 percent in 12 months.

read more

Become a Linux command line black-belt

Opinion and Analysis

!whatever:p, sudo !!, ^foo^bar ... if they whet your appetite and set your pulse racing do I have a web site for you! It’s the Digg or Reddit of the Linux command-line world.

Command-line-fu is a beta web site which brings the social network ranking style of popular sites Digg and Reddit to the scenario of Linux commands.

Users and admins alike list their clever and useful commands which are then voted up or down by other readers, providing a community-moderated guide to what really is cool and clever and, most importantly, filtering out commands that are destructive or not that clever or which don’t actually work.

The items I listed above are some of the current top-ranked commands.

!whatever:p
can be used to retrieve a previously executed command from your history but avoids running it.

Most Linux users will know that prefacing a command with the exclamation point – eg !ps – will re-call the most recent command that began with those series of letters.

Yet, you might not feel safe doing this, depending on the nature of the command and particularly if you’re logged in as the superuser.

Appending the :p moderator will retrieve the command but simply display it, not execute it, allowing you to review it and adjust it if need be. Nice.

In a similar vein
sudo !!
will bring back your immediate last command but execute it as the superuser. That’s handy for when you fire up a shell, run a command and then realise immediately it failed because you forgot to prefix sudo first. Using sudo !! you can save a load of typing; just re-run the last command right away as the superuser.

This is presently the most popular command on the site indicating a lot of people find themself in that very situation – running superuser commands as an ordinary user. Hey, it’s a lot better than the situation most Microsoft Windows’ users find themselves in – running ordinary commands as the administrator!

Now, here’s one which surprised me; with almost 20 years’ UNIX and Linux under my belt I never realised it existed ever before!



- sponsored feature -

The Death of Traditional BI: What’s Next?

How to Make Business Discovery Work for Your Business IP PABX BUYING GUIDE

Business Discovery takes its cues from consumer apps. Like Google, it encourages us- ers to hunt for and explore data without worrying about or even noticing the underly- ing technology. Their entire experience is working within an intuitive interface to get real-time, self-service results with only minimal training. ...more