Skip navigation.

Harold's Home

XML version of this site

PHP Scripts

CLI fun
Mail on 404
HB-NS (NewsScript)


APOD to Desktop
Dreamweaver Extensions


Other stuff
Central Grinder

OOOk Default:

VJ stuff
VJ Tools
Sample Movies


Repeat !!
It happens quite often that while I'm in the Terminal I issue a command for which I don't have enough privileges.
For instance: sudo ipfw list will list all the currently active rules for the firewall. If you happen to forget the sudo part however, all you will see is a warning: ipfw: socket: Operation not permitted.
You'll have to reenter the command again with the sudo part before it.

I knew there was a special command in tcsh that would repeat the previous command however what it was eluded me. Today I got tired of that and actually did some digging and come up with the following: Survival guide to the Unix shell tcsh.

It states that !! repeats the previous command, so if you type sudo !! after a failed attempt you will save yourself some time.

The guide contains some more useful tips but if all you pick up is this one rejoice!!

Show all items | Read all items

About, copyright, privacy and accessibility | Mail