Technology news and Jobs arrow VIRTUALISATION arrow Become a Linux command line black-belt
Become a Linux command line black-belt E-mail
by David M Williams   
Sunday, 08 March 2009
!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!



 
< Next story in category   Previous story in the category >
iTWire user statistics Visitors last 30 days
694,279
Subscribers 15,210
#1 independent technology news advertise here
  •   *  
  • Search
  • AdvSeach
  • Login
  • Events
  • FreeStuff

- Advertisement -

Featured Whitepapers

Follow iTWire on Twitter

About iTWire

iTWire is all about technology news, information, jobs and community for the IT and telecommunications industry professional. Subscribe to our free ICT daily newsletter