Navigating the terminal

"Leopard" Icons in Black

The work computer of one of my colleagues has recently closed the circle and he has now a shiny new apple computer. He is very well-versed in a bunch of computer related tasks, nonetheless he asked me the other day about shortcuts to navigate a shell terminal. I showed him a few tricks, and I thought posting some here just in case they are helpful to my readers too:

  • To go to the beginning of the command line – Ctlr+A
  • To go to the end of the command line – Ctr+E
  • To delete from the current position to the beginning of the line – Ctrl+U
  • To undelete – Ctrl+Y
  • To delete words to the front of current position – Ctrl+K
  • To delete words to the back of current position – Ctrl-W

He also was wondering about an easy way to create a file and open it immediately. The way I do that is with a bash function placed in my .bashrc file

mytouch {
   touch #1
   open #1
}

Enjoy!

Enhanced by Zemanta
Advertisements