DH 180 // day four

Mackenzie Brooks

January 18, 2018

paper vs. digital

https://twitter.com/ProfessMoravec/status/953992067189002240

how computers work

  • series of commands
  • binary
  • layers of abstraction
  • humans!

command line

  • vs. GUI
  • container = shell
  • tree structure

syntax

$ command parameters -flag

  • $ says start after me
  • command = what to do
  • parameters = how to do it flag = use this option

command line crash course

https://learnpythonthehardway.org/book/appendixa.html

list

$ ls

change directory

$ cd

go to desktop

$ cd ~/Desktop

make directory

$ mkdir bananas

change into bananas

$ cd bananas

return to desktop

$ cd ..

next:

  1. return to bananas
  2. make a new directory
  3. change into that directory

touch

$ touch file.txt

open

$ open file.txt

next:

  1. type something
  2. save.
  3. cat file.txt

copy

$ cp file.txt newfile.txt

delete

$ rm file.txt

trace route

$ traceroute

vim!

$ vim file.txt

Use Google to figure out how to edit the file, save, then exit.

Lab 3

  1. Type history.
  2. Copy and paste contents to new file.
  3. Save as lab3.txt in Box.