% CST8207 Week 11 Notes -- Shell Scripts % Ian! D. Allen -- -- [www.idallen.com] % Fall 2016 - September to December 2016 - Updated 2017-03-26 11:20 EDT - [Course Home Page] - [Course Outline] - [All Weeks] - [Plain Text] C O U R S E    E V A L U A T I O N ================================== ____ _ ____ __ __ | _ \ | | ___ __ _ ___ ___ | _ \ ___ \ \ / /___ _ _ _ __ | |_) || | / _ \ / _` |/ __| / _ \ | | | | / _ \ \ V // _ \ | | | || '__| | __/ | || __/| (_| |\__ \| __/ | |_| || (_) | | || (_) || |_| || | |_| |_| \___| \__,_||___/ \___| |____/ \___/ |_| \___/ \__,_||_| ____ ____ _____ _____ _ _ _ / ___/ ___|_ _| | ____|_ ____ _| |_ _ __ _| |_(_) ___ _ __ | | \___ \ | | | _| \ \ / / _` | | | | |/ _` | __| |/ _ \| '_ \ | |___ ___) || | | |___ \ V / (_| | | |_| | (_| | |_| | (_) | | | | \____|____/ |_| |_____| \_/ \__,_|_|\__,_|\__,_|\__|_|\___/|_| |_| -    **Closes Friday December 9.** - Feedback is anonymous. Professors are not told who said what and results are not released until after grades have been submitted. - I publish my [anonymous course evaluations], so your comments will be there to guide future students. - Listen to Dogbert on [satisfaction surveys] Readings, Assignments, Labs, Tests, and ToDo ============================================ Read (at least) these things (All The Words) -------------------------------------------- 1. [Week 11 Notes HTML] -- this file -- **Read All The Words** 2. [Shell Control Structures -- if, then, else, test, `[...]`][1] 3. [List of Commands You Should Know] 4. [Linux and Sysadmin News in the World] 5. [Video Tutorials on Lynda.com] -- tagged by week number Assignments, Quizzes, and Lab work this week -------------------------------------------- > **Reminder:** There are now two quizzes that you need to complete on > Blackboard as part of your term Quiz mark. A third quiz will be posted > before the Final Exam. The Quizzes are *not* optional; see the [Course > Outline]. Check the due date for each assignment and put a reminder in your agenda, calendar, and digital assistant. Just like in the Real World, not all due dates are on the same days or at the same times. - Review last week. Did you do everything assigned last week? - Read [The VI (VIM) Text Editor] and optionally do the bonus [Assignment #04 HTML]. - [Assignment #08 HTML] -- setting permissions, mode, `umask` - Do the worksheet first on Linux file system permissions (modes): - [Worksheet #08 ODT] -- use Open Office or Libre Office to complete this worksheet - [Worksheet #08 PDF] -- pretty version - [Worksheet #08 HTML] -- quick web online version (not pretty) - Bonus (optional) [Assignment #09 HTML] about Midterm #2 - There is a checking program available to check your file format for this bonus assignment, but only people who Read All These Words will know about it. Wrong format means no marks. Do not save or submit the output of this checking program! - [Assignment #10 HTML] -- tar, processes, syslog, crontab, at, mail, shell script - Really do **Read All The Words**. You don't get a second chance to get it right. ### Worksheets Worksheets are preparation for your assignments. You can't do the assignments without having done the worksheets first, and you can't do the worksheets without having first read the Course Notes: 1. Read. 2. Worksheet. 3. Assignment. Form a small study group to do the worksheets. Each person tries the example given, and you make sure you all get the same answers. Worksheets are not for hand-in; they are not worth marks; the assignments test your knowledge of the lectures and worksheets. > The worksheets are available in four formats: Open Office (ODT), PDF, HTML, > and Text. Only the Open Office format allows you "fill in the blanks" in > the worksheet. The PDF format looks good but doesn't allow you to type into > the blanks in the worksheet. The HTML format is crude but useful for quick > for viewing online. Do **NOT** open the Worksheet ODT files using any Microsoft products; they will mangle the format and mis-number the questions. Use the free Libre Office or Open Office programs to open these ODT documents. On campus, you can [download Libre Office here]. - [Worksheet #06 HTML] -- *Optional* Bonus VIM Text Editor Practice - This is an *optional* worksheet for a BONUS assignment using `vim` - Optional command-line VIM tutorial: the `vimtutor` program on the CLS. - Bonus (optional) [Assignment #04 HTML] -- the VIM text editor - Read [The VI (VIM) Text Editor] - [Worksheet #08 ODT] -- Linux file system permissions (modes) - This Worksheet is a prerequisite for [Assignment #08 HTML] - [Worksheet #08 PDF] -- PDF version - [Worksheet #08 HTML] -- HTML version - `chmod, ls -lid, umask` Worksheets prepare you for the upcoming assignments. The Final Exam ============== Read the [NEW Test Instructions] (all the words) before your Final Exam. Put the exam date into your phone! Use the **Name Game** link to test your name before the test. I don't answer questions about the instructions during the test. **Final Exam:** 180 questions in 180 minutes in Week 15 - Thursday December 15 11h30 (11:30am to 2:30pm) in T117/119 - Three Hours! Take a bathroom break before you start the exam. - Assigned Seating in T117/119 (see your email for your assigned seat) The Final Exam contains approximately 180 multiple-choice questions similar to those found in [Practice Tests and Answers]. Do the *all* the practice tests before the real Final Exam! Notes from the Classroom ======================== - **Take notes in class!** Keep a pad open on your desk. - Don't forget to finish your five Blackboard quizzes for each of Midterm 1 and Midterm 2. There will be a third quiz to prepare for the Final Exam. Commands Used ------------- - Keep a notebook with a [List of Commands][List of Commands You Should Know] in it. - You need to write down yourself what each command *does*. - I will check for this list in your lab periods. - Check the updated list of commands each week. - Bring your notes to class! Stop wasting time looking up commands. - Are you making notes from the worksheets on how each command works? - What do the options used in the worksheets mean, for each command? - Don't copy and use options that you don't understand! Finding world-writable files in your account -------------------------------------------- The assignment **Checking Programs** may issue this message: Number of world-writable pathnames in abcd0001 account: 1 ERROR: Sysadmin do not create files that anyone can overwrite. ERROR: See "Examples of uses of find" to find these files. ERROR(-1): Fix the permissions on these files Don't create files or directories that anyone ("other") can write, except the few required ones in the one [Assignment #08 HTML] `head` directory! You must look at all the files in your account to try to find these files or directories that you have created with "other" write permissions. You can find the files the hard way, using `cd` and `ls`, or you can do it the easy way using a recursive command: - To learn how to `find` these world-writable files in your account, first use a command to search for the files that contain the text `world-writable` in all the course notes. The course notes have an example showing what command to use to find world-writable files. - To search the course notes for a text string, re-read section 4.5 of [Assignment #05 HTML], especially item #8 about searching for the text string `Filezilla` in all the course notes. - You will be able to identify which course notes web page you should read to find the example showing how to find world-writable files. - Fix the permissions on these files. Remove write permission for "other". Marking Scheme for Bonus Assignment #09 ======================================= Bonus (optional) [Assignment #09 HTML] may be done now that you have your marks back for Midterm #2 by email. (Your marks were sent to you early Friday morning, November 11.) You can use this bonus assignment to make up for lost marks on your second midterm test. See the assignment for the exact Marking Scheme. Fifteen minute rule =================== Your time as a student is valuable. See the [Week 03 Notes HTML]. Hell Freezes Over ================= Microsoft becomes a [Linux Foundation Platinum Member]. ![Take Notes in Class] -- | Ian! D. Allen, BA, MMath - 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] format [www.idallen.com]: http://www.idallen.com/ [Course Home Page]: .. [Course Outline]: course_outline.pdf [All Weeks]: indexcgi.cgi [Plain Text]: week11notes.txt [anonymous course evaluations]: /#coursenotes [satisfaction surveys]: http://dilbert.com/strips/comic/2005-04-07/ [Week 11 Notes HTML]: week11notes.html [1]: 730_control_statements.html [List of Commands You Should Know]: 900_unix_command_list.html [Linux and Sysadmin News in the World]: 950_linux_world.html [Video Tutorials on Lynda.com]: 910_lynda_index.html [The VI (VIM) Text Editor]: 300_vi_text_editor.html [Assignment #04 HTML]: assignment04.html [Assignment #08 HTML]: assignment08.html [Worksheet #08 ODT]: worksheet08.odt [Worksheet #08 PDF]: worksheet08.pdf [Worksheet #08 HTML]: worksheet08.html [Assignment #09 HTML]: assignment09.html [Assignment #10 HTML]: assignment10.html [download Libre Office here]: 050_course_introduction.html#install-libreoffice-or-openoffice-into-windows [Worksheet #06 HTML]: worksheet06.html [NEW Test Instructions]: 000_test_instructions.html [Practice Tests and Answers]: PRACTICE_TEST_README.html [Assignment #05 HTML]: assignment05.html [Week 03 Notes HTML]: week03notes.html [Linux Foundation Platinum Member]: http://www.linuxfoundation.org/announcements/microsoft-fortifies-commitment-to-open-source-becomes-linux-foundation-platinum [Take Notes in Class]: data/remember.jpg "Take Notes in Class" [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/