% Week 09 Notes for CST8207 - Winter 2012 % Ian! D. Allen - idallen@idallen.ca - www.idallen.com % Winter 2012 - January to April 2012 Tests and Exams =============== * The Midterm Test and Final Exam dates are posted on the [Course Home Page]. * Tests are short answer and multiple choice. * For full mark credit, read the [Test Instructions] for important directions on how to enter your answers on the mark-sense forms. * Each test covers material on the preceding assignments and Weekly Notes, with emphasis on material in the assignments. Midterm Test #2 includes some material from the first test. * Basic calculators are permitted for all tests and exams but will not be needed. (No phones or PDA devices.) * Your second Midterm Test date is Friday March 16 in class. A second practice question set was posted on Friday, March 3. * Final Exam: Monday April 23 11h30 (11:30am to 2pm) - CA105(A,B,C). A practice question set will be available in Week 14. Most difficult questions on Test #1 ----------------------------------- Here is a version of [Midterm Test #1 (PDF)](midterm1.pdf) ordered with the most difficult questions first and including the count of people who answered the question correctly. The questions with the most wrong answers are at the beginning. Questions that are poorly answered often re-appear on subsequent tests. 87 people wrote the test. Lecture Notes for This Week =========================== From the Class Notes link on the Course Home Page ------------------------------------------------- * [Test Instructions](000_test_instructions.html) - Important directions on how to enter your answers on the mark-sense forms. * This is [Your Brain on the Internet](005_this_is_your_brain.txt) * [Frequently Asked Questions](007_freqently_asked_questions.html) * [How to report Problems](008_how_to_report_problems.txt) * [Installing VMware Tools](010_vmware_tools.html) * [Why Learn the Unix Shells?](100_why_shell.txt) * [Command Line vs. GUI: Power Users need more than GUI](110_command_line_vs_gui.txt) * [The Unix/Linux Shell](120_shell_basics.html) * [Searching for items in the Unix manual pages (RTFM)](130_man_page_RTFM.txt) * [Options and Arguments on Unix Command Lines](140_arguments_and_options.txt) * [Unix/Linux Pathnames (absolute, relative, dot, dot dot)](150_pathnames.txt) * [Hard links and Unix file system nodes (inodes)](200_links_and_inodes.html) * [Unix/Linux File System - (correct explanation)](210_file_system.txt) * [Directories: ROOT, /root, HOME, /home, and current](220_home_and_HOME.txt) * [Searching for and finding files by name, size, etc.](250_finding_files.txt) * [GLOB patterns (wildcard pathname matching)](260_glob_patterns.txt) * [Unix Shell I/O Redirection (including Pipes)](270_redirection.txt) * [Unix/Linux Shell Command Line Quoting Mechanisms](280_quotes.txt) * [The VI (VIM) Text Editor](300_vi_text_editor.html) * [Unix Modes and Permissions](400_permissions.txt) * [Umask and Permissions](410_umask.txt) * [Unix/Linux Command List (cumulative)](900_unix_command_list.txt) ### Assignments and Labs ### * See your [Blackboard] ToDo list for all assignment due dates * Finished [Lab #06] - Linux File System Permissions (modes) * Answers are posted - do your Self-Mark surveys on Blackboard. ### Practice Midterm Test #2 ### * [Practice Midterm Test #2](practicetest2.pdf) From the Classroom Whiteboard/Chalkboard ---------------------------------------- * Your in-class notes go here. - If you're not actively taking notes in class, why are you here? - Assignments must be [Right the First Time](week01notes.html#right-the-first-time) * Send me video from the Rap. My wife wants to see me. - Hey! I've still not received any video. Anyone out there? * Dates for tests: - Midterm Test #2 is in-class on Friday March 16. Do the [practice test](practicetest2.pdf) first. Midterm test #2 includes all material up to and including lab06, as well as some repeat questions from the previous midterm test. - Final Exam on Monday April 23. Do the practice test first. The Final Exam includes all material. ### Topic: studying the material ### * Review your mistakes on the first midterm test. * See the [Practice Midterm Test #2](practicetest2.pdf) * Review the labs, especially the commands used in each of the labs and in the [Unix/Linux Command List](900_unix_command_list.txt) * Know **why** the shell behaves that was. Copy/paste teaches you nothing. * Review how the shell works: GLOB, redirection, quotes: - pipes first, then redirection - rules for redirection, rules for pipes ### Topic: Common Misunderstandings ### * ` echo one "two three" four 'five "six" seven' eight ` * ` echo " * " ; echo ' * ' ; echo '' * '' ; echo "" * "" ` * ` echo ?nosuchfile ; ls ?nosuchfile ; echo "?nosuchfile" ; ls "?nosuchfile" ` * ` echo hi >a ; cp a b >file ` * ` echo hi >a ; ln a b >file ` * ` echo hi >a ; mv a b >file ` * ` echo hi >a ; rm a >file ` * ` head x >x ; tail x >x ; sort x >x ; wc x >x ; ls x >x ` * ` echo hi >.a ; echo * ; echo ?? ; echo [.]* ` * ` echo hi | cat /etc/passwd ` * ` echo hi >a ; cp a b | head ` * ` echo hi >"?abc" ; rm \?abc ; rm ./'?abc' ; rm ./././\?abc ` * ` echo a b c >out ; echo a b >out c ; echo >out a b c ; >out echo a b c ` * ` echo hi >a ; ls a ??? >out 2>errfile ; ls a ??? >out 2>&1 ` * ` umask 111 ; echo hi >foo ; ls -l foo ` * ` umask 022 ; echo hi >foo ; ls -l foo ` * ` umask 033 ; echo hi >foo ; ls -l foo ` * ` echo hi >foo ; chmod 277 foo ; ls -l foo ; cat foo ` ### Topic: Applications ### * See 3.3 Examples of simple pipes in [Unix Shell I/O Redirection (including Pipes)](270_redirection.txt) - Display only lines 6-10 of the password file - Display only the second-last line of the password file - Which five files in current directory are largest - Display practice test and weekly file dates from the Course Notes - Display the dates of the Midterm tests from the Home Page - Display current Ottawa weather temperature and forecast - Display Ottawa tomorrow weather forecast - Display the first top story from the BBC - Display the current BBC weather for Vancouver - Display the current Space Weather forecast for Canada - Display the current phase of the Moon * shell scripts - save your common command pipelines [Test Instructions]: 000_test_instructions.html [000_README.txt]: 000_README.txt [000_Licensing.txt]: 000_Licensing.txt [005_this_is_your_brain.txt]: 005_this_is_your_brain.txt [007_freqently_asked_questions.html]: 007_freqently_asked_questions.html -- | Ian! D. Allen - idallen@idallen.ca - Ottawa, Ontario, Canada | Home Page: http://idallen.com/ Contact Improv: http://contactimprov.ca/ | College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/ | Defend digital freedom: http://eff.org/ and have fun: http://fools.ca/ [Plain Text] - plain text version of this page in [Pandoc Markdown](http://johnmacfarlane.net/pandoc/) format