cop3502: introduction to computer science

15
COP3502: Introduction to Computer Science Yashas Shankar

Upload: calida

Post on 22-Jan-2016

18 views

Category:

Documents


0 download

DESCRIPTION

COP3502: Introduction to Computer Science. Yashas Shankar. Basic UNIX commands. SSH to shell.cs.fsu.edu Reviews ls – list cp – copy mv – move (rename) rm – remove (delete) pwd – gives current directory man – gives manual ‘>’ – redirection, create new file - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: COP3502: Introduction to Computer Science

COP3502: Introduction to Computer Science

Yashas Shankar

Page 2: COP3502: Introduction to Computer Science

Basic UNIX commands SSH to shell.cs.fsu.edu Reviews

ls – list cp – copy mv – move (rename) rm – remove (delete) pwd – gives current directory man – gives manual ‘>’ – redirection, create new file ‘>>’ – redirection, append the file, create a file if it does not

exist Emacs – edit text

CTRL-X-S to save CTRL-X-C to exit

Page 3: COP3502: Introduction to Computer Science

Basic UNIX commands ls – list files and directory Try ‘man ls’ to see how to use ls ls –l list details

shankar@diablo:~/COP3502>ls -ltotal 24- rw- --- --- 1 shankar CS-Grads 7 Aug 27 15:10 fileone.txtd rwx --- --- 2 shankar CS-Grads 4096 Aug 16 12:02 PROGRAMMINGd rwx --- --- 2 shankar CS-Grads 4096 Aug 27 11:39 SLIDESd rwx --- --- 2 shankar CS-Grads 4096 Aug 17 11:08 WEBPAGEd = directory

r = readw = writex = execute

There are 3 groups of users-you-your group-others

Page 4: COP3502: Introduction to Computer Science

Basic UNIX commands More on directories

. your current directory .. one higher directory ~ your home directory

Shell.cs.fsu.edu higher directory

shankar home directory

COPxxxx COP3502

ppp2131.txt

Assume that you are in ~/COP3502Cd .. move to your home directoryCd COPxxxx move to COPxxxx directoryCd ../COP3502 move to COP3502 directory

Page 5: COP3502: Introduction to Computer Science

Basic UNIX commands More on directories

. your current directory .. one higher directory ~ your home directory

Shell.cs.fsu.edu higher directory

shankar home directory

COPxxxx COP3502

a.txt

Assume that you are in ~/COP3502Cp a.txt ../COPxxxx/b.txtCp a.txt ../COPxxxxmv ../COPxxxx/a.txt ../c.txt

b.txta.txt

a.txt

Page 6: COP3502: Introduction to Computer Science

EXAMPLES

Shell.cs.fsu.edu higher directory

COP3502_TEMP

c.txt

A B C

a.txt

b.txt

shankar home directory

Page 7: COP3502: Introduction to Computer Science

EXAMPLESShell.cs.fsu.edu higher directory

COP3502_TEMP

c.txt

A B C

a.txt

a.txt

shankar home directory

cp ~/COP3502_TEMP/C/c.txt ~/COP3503_TEMP/A/a.txtcp /home/grads/shankar/COP3502_TEMP/A/a.txt /home/grads/shankar/COP3502_TEMP/B

Page 8: COP3502: Introduction to Computer Science

EXAMPLESShell.cs.fsu.edu higher directory

COP3502_TEMP

A

a.txt

shankar home directory

cp A/a.txt .cp ~/COP3502_TEMP/A/a.txt .cp /home/grads/shankar/COP3502_TEMP/A/a.txt .

a.txt

Page 9: COP3502: Introduction to Computer Science

Unix redirection ‘>’ redirect output to a new file

An existing file will be deleted and created (overwrite)

‘>>’ redirect output to a file Append output to the end of the file if the file

exists Create a new file if the file does not exists

Page 10: COP3502: Introduction to Computer Science

How to use Emacs Emacs filename starts emacs CTRL-X-S save CTRL-X-C exit CTRL-k delete a line (after where the cursor

is) CTRL-y paste the deleted line CTRL-g cancel CTRL-x u undo

Page 11: COP3502: Introduction to Computer Science

Assignment#3 See handout Due next class

Page 12: COP3502: Introduction to Computer Science

Syllabus & Schedule

Page 13: COP3502: Introduction to Computer Science

Textbooks You will need the “The analytical engine”

textbook starting from Week4. You will cover the “Ethics for the information

age” textbook in Week13 You will need this textbooks for the extra credits

How to find textbooks? FSU bookstore Bills bookstore Online

Page 14: COP3502: Introduction to Computer Science

Extra credits Late assignments are not accepted (you will

get zero). There will also not be any make-up quizzes.

You can get those points back by doing extra credits

There are four extra credits. Two will replace two of your lowest homework scores. Another two will replace two of your lowest quiz scores.

One extra credit write a 5 page summary of one chapter in the “Ethics for the information age” textbook

Four extra credits four chapters with 5 pages each There will not be any other extra credits

Page 15: COP3502: Introduction to Computer Science

Before we leave Homework#1 dues tonight: send me an e-mail

from your CS account Subject COP3502: Assignment#1 submission Body your full name

Homework#3 dues next class Get familiar with UNIX and Emacs Next class:

C, C++, Java