There are several keyboard tricks that are good to know when using the Terminal Activity. These save time and work regardless of the commands you are using.
If you been doing a lot in your terminal and the terminal window is full of text you can press ctrl on the keyboard and l (lower case L) simultaneously. The terminal window is immediately cleared of text, leaving you with a nice uncluttered terminal. This is particularly useful after using a full-window character mode program.
If for any reason you realize that a command you are using seems to be stuck or is going on longer than you need you can use ctrl and c (pressed simultaneously) and this halts the command. This means your command will be stopped before it finishes so make sure you really want to do this before trying it.
You can often use the tab key to finish typing the name of a program or file. This is called "Tab completion". If you have partly typed a command try pressing the tab key. If there are no other commands that start with the same sequence of letters then the complete command is automatically displayed in the terminal. Try for example typing part of the "help" command like this:
followed by pressing tab. You see the terminal displays "help". This is because the command interpreter can see that there are no other commands starting with "hel" in the directories where it looks for commands (the path) so it assists you by completing the full command name when you press tab.
If there is more than one command that starts with the letters you have typed then pressing tab once does nothing. Try, for example, typing:
followed by the tab key. Nothing happens. Now try the same thing but press tab and quickly follow it by pressing tab again. In this case you see all the other commands displayed that start with "he" like so:
You can now see the other commands starting with these same letters and you can either choose one by typing out the whole command, or you can type some more letters of the command you want and finish it with "Tab complete".