Lecture 05 + HW

posted Feb 6, 2013, 8:42 AM by Samuel Konstantinovich   [ updated Feb 6, 2013, 8:44 AM ]
Day 7 (terminal commands)

Do now: Open the two web pages you made yesterday. If it is on lisa, use the lisa link, if you did it home, and didn't put it on lisa, just open the local file.

A recap on some commands:
pwd          print working directory
ls             list files in working dir
ls -l          ls in “long” style
cd             change dir
cd /           cd to root dir
cd ~          cd to home dir
cd ..          cd UP one level in filesystem hierarchy
cd ../..      cd UP 2 levels
cd ~/Downloads       cd to Downloads in your homedir

Spend a few minutes to figure out how to use the following commands:
mv
cp

What can you do if you get stuck?

man (short for “manual”) gives you info about terminal cmds

e.g.,
$ man pwd
$ man ls
$ man cd

From a terminal, navigate to your Desktop directory, then run

$ ls --color
$ mkdir foo
$ ls --color
$ cd foo
$ ls --color
$ gedit foo.html
Then type some stuff into the foo file and save it, close gedit.

From a terminal prompt, run
cat

cat (“catenate”) shows the contents of a file on the terminal

To kill the cat (or other things):  Ctrl-C
Navigate to your newly-created foo directory, then run

cat foo.html


Homework: What are SSH and FTP? What are they used for?

Find an SSH (putty), and FTP (filezilla) client , connect to lisa.stuy.edu, or bart.stuy.edu with each of them. 

Comments