Command Line Tip
I’m still a noob when it comes to the shell so I tend to pick up new things all the time. As a result I thought I’d share one which I’ve found mighty handy – !!
sudo !!
!! is the magic that reruns the previous command. In this instance, I am prepending sudo to my original command.
In such situations I’d generally press up and scroll to start of my original command to prepend sudo to it and run it again – a process which can be rather laborious.
Obviously there are tonnes of applications for this command, I’m merely highlighting one that’s been pertinent to my usage lately.
Can you think of any other situations where this might be useful? Or alternatively do you have any command line gems that you wish to share?
Enjoyed this article? Be sure to subscribe to my RSS feed.
