Wednesday, April 17, 2013

Mac: Some terminal and Unix/Mac shortcuts

Here I will give you some interesting shortcuts, that every one of us need when working on daily bases with unix or mac and their terminal:
  1. Up/Down arrows:
    Preview previews commands. It saves your time when you need the previously typed commands again and again for execution.

  2. control + a:
    Moves the cursor to start of the line. It is very useful when you got a long line about fifteen chars or more, and you need to move to the start of the line or close to the start of the line to do some changes, this shortcut will move you to the start very quickly instead of returning character by character.

  3. control + e:
    Moves the cursor to end of the line. So you can remember that by "a" for alphabit and "e" for the end.

  4. option + click line (Mac OS x and terminal only):
    Moves the cursor to the click point.

  5. tab (autocomplete):
    Try to complete the command or (file or folder name).

  6. tab + tab:
    It is useful when tab doesn't complete, pressing tab twice will show the list of available possible matches.

  7. command + ~:
    Cycle between terminal windows (terminal only), for GUI use command + tab.

  8. command + k:
    Will clear the screen and scroll back(terminal only).

  9. command + plus(+):
    Makes fonts bigger.

  10. command + minus(-):
    Makes fonts smaller.

  11. option + command + T:
    Open the characters map viewer.

  12. command + E:
    Find using the selected text.

  13. command + S:
    Export terminal text as.

  14. shift + command + S:
    Export selected text as.

  15. Triple-click the line
    Select a complete line of text.

  16. Double-click the word
    Select a word.

Use these shortcuts to save time while using Terminal.