Last Updated: February 25, 2016
·
358
· nelsonmarcos

Forget sudo?

If you get frustrated because you forgot to run your last command with sudo, just try

$sudo !!

1 Response
Add your response

The one's that's I actually find more useful to me is when i do a cd /path/to/file then discover it's a file not a folder, and i want to open vim, doing a vim !! would result to

vim cd /path/to/file

instead you can use just the parameter passed to cd and pass it to vim doing this

vim !!:$

over 1 year ago ·