Lecture 1: Shell using Bourne Again Shell
<date> - shows you time and date<echo> - results the string after ‘echo’<echo $PATH> - lists all the paths of the computer<which echo> - results the path that runs ‘echo’<pwd> - print working directory<cd> -change directory<.> - current directory<..> - parent directory<ls> - list files in the directory<ls ..> - list files in a specified directory<cd ~> - goes to your home directory<cd - > - goes to directory you’re previously in<ls --help> - list of information about the FILEs<ls -l> - gives more information about the files (group owner)
<ls> - are you allowed to see which files are in this directory<search> - are you allowed to enter this directory<mv (path from) (path to)> - move files<cp> - copy the file<rm> - remove file<rmdir> - remove a directory if its empty<mkdir> - make a new directory, use quotation marks<man ls> - manual page for ls| - pipe, take the output of the program to the left and make it the input of the program to the right |
<sudo> - super user do<sudo su> - for you to be the administratorLecture 2: Shell Tools and Scripting
<grep> - search in a file<echo $(pwd)> - results the current directory<ls *.sh> - outputs all files with .sh extension<convert image.png image.jpg> - converts images<vim script.py>- shows python script<man rg> -<find . -path ‘**/test/*.py’ -type f> - finds all path with .py file<&&> - and operator<||> - or operator<;> - always true<o> - creates a new line below and goes to insert mode<O> creates a new line above<u> - undo<c-r> - redo (control R)<dw> - deletes a word<de> - deletes end of the word<ce> - change end of the word and goes to insert mode<x> - deletes that character<r> - replaces a character<i>
<esc> to go back to normal mode<esc> on your keyboard<c2w> - change word</> - search<R><v>
<c-v><h><j><k><l> - select a block of text<y> - copy and goes to normal mode<p> - paste<V> - copy lines of text<quit> - quits vim<:w> - writes on the file so you can ‘save’ it<:help :w> - get help for a ‘w’<:qa> - quit all<c-d> -page down<c-u> - page up<fc> - find the first ‘c’ in textLecture 6: Version Control (git)
<git help <command>> - get help for a git command<git log> - shows a flattened log of history<git checkout -b <name>> - created a branch and switched to it<git branch> - shows branches<git branch <name>> - creates a branch<git merge <revision>> - merges into current branch<git mergetool> - uses a fancy tool to help resolve merge conflicts<git rebase> - rebase set of patches onto a new base<git stash> - temporarily remove modification to working branch<git commit --amend> - edits a commit’s contents/message<git reset HEAD <file>> - unstage a file<git checkout -- <file>> - discard changes<git remote> - list remotes<git remote add <name> <url>> - add a remote<git push <remote> <local branch>:<remote branch> - send objects to remote, and update remote reference<git fetch> - retrieve objects/references from a remote<git pull> - same as git fetch; git merge<git clone> download a repository from remote<git checkout master><git fetch><git pull --rebase origin master<git checkout -b <name of new branch>><git status><git add .><git commit>
<git status><git push origin <name of new branch>><git stash><git rebase -i HEAD~2> - changing the last 2 comments<git fetch><git status><git log>
<git push origin <name of branch> --force><git stash><git stash pop>