Terminal Productivity Tip: ^^ notation


It turns out that most of us computer users have to use the glorious old terminal every once in a while, whether it's finding out our IP, finding out whether your internet is down by pinging google, or installing updates on our server over SSH. Today's tip will help you out when you have multiple tasks to do with similar syntax, or when you misspell a command.

The notation for this command is "^foo^bar" where "foo" is a snippet in the last executed command that you want to find and replace and "bar" is what you want there instead. It automatically executes the command as well. So next time you accidentally type "pnig www.google.com", instead of having to type the command all over again, just type "^pni^pin", and it'll execute "ping www.google.com." This is also useful if you are installing apps using "apt-get" in debian based linux, like Ubuntu. Sometimes I can't quite remember the name of the package, so I can easily try a few combinations without having to retype the whole "sudo apt-get install [package-name]" over and over.

If you liked today's hint, be sure to subscribe. Any questions or suggestions can be directed to evan [a] multithreadedmind.com, or to @multithreadblog on twitter.
blog comments powered by Disqus