[Cialug] repeat w/ sudo
Thomas Kula
kula at tproa.net
Tue Mar 2 11:07:39 CST 2010
On Tue, Mar 02, 2010 at 11:04:54AM -0600, Matthew Nuzum wrote:
>
> What's the simplest, shortest, easiest to perform, whatever way to
> repeat the last command but with sudo in front of it?
> currently I up arrow, ctrl + a then type sudo [space] [enter].
> It seems like something so common should have a keyboard shortcut.
I tend to do:
$ command_i_should_have_ran_with_sudo (grumble when I don't remember to use sudo)
$ sudo !!
See if your shell has "!!", or the equivalent (I appear to have
it on bash on one machine here, and tcsh on another).
--
Thomas L. Kula | kula at tproa.net | http://kula.tproa.net/
More information about the Cialug
mailing list