Skip to content

Instantly share code, notes, and snippets.

@alexpaul
Last active October 7, 2018 11:34
Show Gist options
  • Save alexpaul/bd66794a00e5bc8c04b2412a7b33fdf5 to your computer and use it in GitHub Desktop.
Save alexpaul/bd66794a00e5bc8c04b2412a7b33fdf5 to your computer and use it in GitHub Desktop.
Terminal Commands

Terminal Commands

Command Summary
cd ~/Documents navigate to the documents directory of your mac
pwd show current directory
ls list contents of current directory
mkdir GitIntro create a folder named GitIntro
cd GitIntro navigate to the newly created GitIntro folder
echo "Github Introduction" >> README.md create a markdown file called README.md
touch testFile.txt also creates a file with a given extension - however won't populate it with text as above
open README.md open the README.md file for editing
rm -rf SomeDirectoryName to delete a directory from the file system
clear clear your terminal
cmd + l shortcut to clear terminal
alias ll="ls -al" alias to list all contents of current directory in long format
cd.. SomeInnerDirectory navigates to the pareent directory
whoami current logged in username
diff - u "File1" "File2" to find differences in versions

Resources

Resource Summary
Terminal Commands A-Z Terminal commands A-Z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment