Terminal commands for Mac

If you're working in Terminal on your Mac (Or Linux environment), you need to know the most important UNIX commands: those that work with directories, with files and helps to type your scripts faster.

SHORTCUTS

Key/CommandDescription
Ctrl + A Go to the beginning of the line you are currently typing on. This also works for most text input fields system wide. Netbeans being one exception
Ctrl + E Go to the end of the line you are currently typing on. This also works for most text input fields system wide. Netbeans being one exception
Ctrl + Q Clears everything on current line
Ctrl + L Clears the Screen
⌘Cmd + K Clears the Screen
Ctrl + U Cut everything backwards to beginning of line
Ctrl + K Cut everything forward to end of line
Ctrl + W Cut one word backwards using white space as delimiter
Ctrl + Y Paste whatever was cut by the last cut command
Ctrl + H Same as backspace
Ctrl + C Kill whatever you are running
Ctrl + D Exit the current shell when no process is running, or send EOF to a the running process
Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it.
Ctrl + _ Undo the last command. (Underscore. So it's actually Ctrl + Shift + minus)
Ctrl + T Swap the last two characters before the cursor
Ctrl + F Move cursor one character forward
Ctrl + B Move cursor one character backward
Esc + F Move cursor one word forward
Esc + B Move cursor one word backward
Esc + T Swap the last two words before the cursor
Tab Auto-complete files and folder names