Command | What it does | Usage |
---|---|---|
pwd | Displays current directory | pwd |
dir or ls | Displays a list of public files & folders in the current directory | dir <directory> |
ls -a | Displays a list of all files in the current directory | ls -a |
cd | Moves into the specified directory | cd <directory> |
cd .. | Moves one directory "up" in the file structure | cd .. |
mkdir | Create a directory | mkdir <directory> |
mkdir -p | Create nested directory | mkdir -p <directory> |
touch | Create a file | touch <file to create> |
curl -O | Transfer data from URL | curl -O <url here> |
zip | Zips a file | zip <new file name> <old file name> |
zip -r | Zips a directory and all folders/files in it | zip <new file name> <old file name> |
unzip | Unzip a compressed .zip file | unzip <filename> |
cp | Copies a specified file into a specified location | cp <file name> <desired copy destination> |
mv | Moves a specified file into a specified location | mv <file name> <desired move destination> |
explorer.exe / open | Opens the file explorer GUI in the specified directory | Windows: explorer.exe <directory to open> - Mac: open <directory to open> |
code | Opens VS code in the specified directory | code <directory or file to open> |
npm install | Install the required packages and libraries for the project | npm install |
Command | What it does | Usage |
---|---|---|
ctrl+s | Save file | Saves the current file |
ctrl+z | Undo | Reverts the most recent change to the file |
ctrl+y | Redo | Readds a reverted change to the file |
ctrl + ` | Open terminal | Open the terminal in VS Code |
ctrl+shift+` | Open new terminal | Opens a VS Code terminal in the current directory |
ctrl+shift+p | Command palette | Opens VS Code command palette for quick settings adjustments |
alt+↑ | Move line | Move the current line up |
alt+↓ | Move line | Move the current line down |
alt+shift+↑ | Copy down | Creates a copy of the line, or selected lines, directly above |
alt+shift+↓ | Copy down | Creates a copy of the line, or selected lines, directly below |
alt+click | Create cursor | Drops an additional curser where you click. |
drag mouse3 | Create cursors | Drops an additional cursor on each line dragged through |
ctrl + p | File selector | Select files from a dropdown menu |
ctrl + / | Comment | Comment current line or selected area |
Command | What it does | Usage |
---|---|---|
mocha | run all mocha test files | mocha |
mocha < path > | run specific mocha test file | mocha <path-to-file> |
mocha -b | run until fail | mocha -b |
mocha -g | Run tests and output specified test's results | mocha -g <filename> |
mocha -h | Display help menu | mocha -h |