cop3502: introduction to computer science
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 PresentationTRANSCRIPT
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 ‘>>’ – 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
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
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
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
EXAMPLES
Shell.cs.fsu.edu higher directory
COP3502_TEMP
c.txt
A B C
a.txt
b.txt
shankar home directory
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
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
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
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
Assignment#3 See handout Due next class
Syllabus & Schedule
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
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
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