Skip to content

Instantly share code, notes, and snippets.

@epoch
Last active May 2, 2023 11:39
Show Gist options
  • Save epoch/b1bd6f6e69c1581c5c1a to your computer and use it in GitHub Desktop.
Save epoch/b1bd6f6e69c1581c5c1a to your computer and use it in GitHub Desktop.

Terminal Cheatsheet

change directories

$ cd directory_name

make a directory

$ mkdir directory_name

go up one directory

$ cd ..

make a file

$ touch file_name

delete a file

$ rm filename

delete a directory

$ rm -r directory_name

rename or move a file or folder

$ mv old_file_name new_file_name

copy a file or folder

$ cp old_file_name new_file_name

open the current directory in the Finder

$ open .

open the current directory in the vscode

$ code .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment