Created
August 22, 2012 16:58
-
-
Save keeperofthenecklace/3427477 to your computer and use it in GitHub Desktop.
Command line Shortcut
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Esc shft + b - moves cursor(c) BACK to begin of a text. eg. (c)albert (c)mckeever (c)help | |
Esc shft+ f moves cursor(c) FORWARD to begin of a text. eg. (c)albert (c)mckeever (c)help | |
shft + cmd - selects all | |
Ctrl+A and Ctrl+E - home and end | |
Ctrl+U: This clears the entire line so you can type in a completely new command. | |
Ctrl+K: This deletes the line from the position of the cursor to the end of the line. | |
Ctrl+W: This deletes the word before the cursor only. | |
Ctrl+R: This lets you search your command history for something specific. | |
Tab: autocomplete | |
File Paths | |
----------- | |
$ Dragging Files from FINDER Into the Terminal Window => $albert/sites/project | |
$ cd .. moves you one folder up. | |
$ cd ../config moving in the directory will take you to the config dir from the app dir. | |
$ cd - This will move you back to your last working directory | |
$ cd move you to the home dir | |
$ !! to represent the last command you ran | |
$ !cat if you want to run the last command that used cat | |
$ !cat:p If you just want to see what the last cat command was, you can instead run: | |
Replacing | |
------------- | |
$ ^projact^projects - will replace your last command with the new string. so, cd Sites/projact/rails becomes Sites/projects/rails | |
History | |
----------- | |
$ history display all commands | |
$ history | grep Sites displays all history with Sites commands. | |
eg... 481 cd/Sites | |
482 cd/Sites/codes | |
$ !482 runs the command cd/Sites/codes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment