8
votes
3answers
491 views

Execute a line of commands with one sudo

For example if I want to create a file and enter text in one line I can redirect the output into a file with the use of the > operator: echo "something" > /path/foobar but if I don't have ...
15
votes
1answer
753 views

How can I `alias sudo !!`?

I'm trying to set an alias for sudo !! in Bash. I tried alias sbb='sudo !!', but it interprets that as a literal !! and prints sudo: !!: command not found If I use double quotes, it substitutes ...
4
votes
3answers
302 views

Can I insert sudo via the ^ command?

Sorry if this is a yes/no question.. I am reading this unix tutorial and found the following: Repeating and Modifying the Previous Command [..] If you mistype leavenworth as leaveworth ...