CS 202 Computer Science II Lab Fall 2009 August 27
Reza – Office SEM 255A – – Web-site – Office hours: TBA
Today Topic Course Objectives Requirements Basic Unix/Linux
Course Objectives Familiar with Unix/Linux Environments Be able to work under Unix/Linux Environments Learn more about Tips/Tricks of C++ Language Learn how to debug programs Learn how to make programs reusable
Requirements Attendance Exercises Programming Assignments Reports Late turn in, subject to the policy provided by the professor Note : all students must have ecc account.
Lab Assignments All coding standards in the class website have to be followed. Two copies of assignments are required – A printed version based on the “Report Template” – A soft copy including : report, code, and executable on a CD or Jump Drive – Put two copies in one plastic folder
Why Linux? Can be used as: – Web servers – Scientific workstations Gives you: – More speed – More power – More control Advantages: – It is free – Flexible for different hardware platforms – Fewer crashes – Better security
Basic Unix/Linux Commands command [options] [arguments] ls [options] [directory or file] – allows users to see a list of file or directory in the specific location given by the users – $ ls /usr mkdir [options] directory – allows users to create directory – $ mkdir cs202 rmdir [options] directory –remove a directory rm [options] file – remove (delete) a file or directory (-r recursively deletes the directory and its contents) (-i prompts before removing files) – $ rm –R cs202 ! WITH rm COMMAND, CAN’T UNDO emacs/xemacs – are text editors used to create/modify files – $ emacs cs202file.cpp
Basic Unix/Linux Commands man – allows users to look up for the information of applications including description, usages, etc. – $ man ls cd [directory] – changes working directory to another or accesses to interesting directory, / or.. or../.. or../mydir/test/ or /mydir/test/ – $ cd cs202 cp [options] file1 file2 –copyfile1 intofile2; file2 shouldn't already exist. This command creates or overwritesfile2 – $ cp cs202file.sh homework.sh mv – moves file/directory to another location or another name – $ mv cs202 ~/tmp
Basic Unix/Linux Commands lpr (lp) [options] file –print to defined printer cat [options] file –concatenate (list) a file pwd – print working (current) directory passwd – to change the password exit – leave the shell logout – leave the system ^D –indicates end of data stream ^C –interrupt
Questions?