sudo !! and !! in general

I’ve been using linux or BSD in some form or another since I was a kid… at least trying it out… I like a challenge.   I’ve just started using it mainly in the last couple of years or so…. and I’ve switched all but one of my machines to linux, and haven’t dual-booted back to windows in over 6 months.  I like it that way.  Wine can run most of the stuff I need anyways, and I have a Xbox 360 for games.

As long as I’ve been running these forms… I did not know about “sudo !!” and “!!” in command line.  Often you go through typing some HUGE line of code, or feeding in some command to run mplayer, remotely, while linking through japan for some reason.. just to see if you can… and you get “you do not have sufficient privileges!!!!!!!!!!!!!!!! IDIOT!!!!!!!!”

Or something to that effect… well instead of going to the front of the command again, just type sudo !!.

!! repeats the last command you typed in, and sudo !! does it with a bit o’ SUDO action… so enjoy if you didn’t know already… and if you did… why didn’t I get the memo?


2 Responses to “sudo !! and !! in general”

  1. coool, I actually did not know of that either!

  2. Hey, my pleasure!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: