This is a growing list of the (mostly) Unix-like commands that I use the most while working on frontend projects. When I use the word "print" below, I probably mean log something to the terminal. Some commands are prefix by $
to show it's a command line command - don't actually type the $
.
Command | Description | Note |
---|---|---|
$ pwd |
Print current directory | |
$ ls -a |
Lists everything in the current directory, including hidden files (-a ). |
This lets you makes sure you can see your .gitignore, .bashrc, etc |
$ mkdir example && cd $_ |
Makes a new directory and immediately goes into it. | |
$ mkdir -p example |
Makes a new directory IF one of the same name doesn't already exist. | |
$ ln -s /path/to/file /path/to/link |
Creates a symbolic link. |
- ssh, using .bashrc for aliases, etc
- scp
- hack to get keys on server
- creating keys
Command | Description | Note |
---|---|---|
u |
Undo | |
ctrl + r |
Redo | |
dd |
Delete line | |
/ |
Search file | |
n |
Goes to next found search | To do this, type /searchterm + Enter , then hit n to go through results |
:w testfoo |
Writes to a file and saves it with the name. | If it already exists, you can just use :w |
:wq |
Write to a file and then quit. |
- forcing removal of node_modules
Windows and Unix command line equivalents How to Set Up SSH Keys