commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Pressing Ctrl combined with 'a' will move the cursor to the beginning of the command under bash (other shells?). I used to do this after arrowing up for the last command, then typing 'sudo ' to run the last command as root, but of course the all time greatest command here `sudo !!` is more succinct. Still Ctrl+A can be very useful when you want to edit something at/close to the beginning of the command line.
There are 6 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.