% CST8207 Week 07 Notes – File Systems % Ian! D. Allen – – [www.idallen.com] % Fall 2014 - September to December 2014 - Updated Fri Oct 17 06:05:07 EDT 2014 Readings, Assignments, Labs, and ToDo ===================================== - Read (at least) these things (All The Words): - [Week 07 Notes HTML] – this file – **Read All The Words** - [Unix/Linux File System - directories, inodes, etc.] - [Hard links and Unix/Linux file system index nodes (inodes)] - [Hard links and Unix file system nodes (inodes)] - [Unix/Linux Disk Usage, Hard Links, Finding Inodes] - [List of Commands You Should Know] - [Video Tutorials on Lynda.com] - Using your [lynda.com] account, watch [Unix for Mac OS X Users] - **3. Working with Files and Directories** - Hard links 5m 30s - Symbolic links 6m 36s - **5. Commands and Programs** - Disk information commands 6m 8s - df, du, Midterm Test #2 ---------------- - All test and exam dates are posted on the [Course Home Page]. - Midterm #2 takes place Friday, October 31 in your one-hour lecture. - You must read the [Test Instructions] first. - [213 practice Midterm Test #1 questions] are available along with an answer key in the [Class Notes]. See the [Practice Test README] page. - A Quiz on most of these questions is available on Blackboard. See the [Week 04 Notes HTML] for how quizzes work. - Midterm Test #2 covers: - anything on the previous midterm test, especially questions that were not answered correctly, plus: - weekly notes, labs, quizzes, and assignments for Weeks 1 through 8 inclusive. - The emphasis is on material covered since the previous test. - Material in [Assignment #04 HTML] is relevant to this test. - Material in [Assignment #06 HTML] is relevant to this test. Final Exam 8am Monday December 8 -------------------------------- The final exam schedule is posted on the [Course Home Page]. Your final exam is three hours long, starting at 8am, in T117/119. It will be 180 multiple-choice questions. There will be a set of practice questions, and a quiz on those questions, posted before the exam. Assignments and Lab work this week ---------------------------------- Check the due date for each assignment and put a reminder in your agenda, calendar, and digital assistant. - Read All The Words, Do, and then Submit via Blackboard: - [Assignment #04 HTML] – Start-Up, GLOB, redirection, environment - [Assignment #06 HTML] – quoting, search PATH, disk usage, hard and soft links - Really do **Read All The Words**. You don’t get a second chance to get it right. ### 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 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 #02 ODT] online viewing: [Worksheet #02 HTML] – Using standard Linux commands I - `PS1, cd, find, less, ls, man, mkdir, passwd, pwd, rmdir` - [Worksheet #03 ODT] online viewing: [Worksheet #03 HTML] – Using standard Linux commands II - `cat, clear, cp, find, grep, history, less, man, mv, rm, sleep, touch` - [Worksheet #04 ODT] online viewing: [Worksheet #04 HTML] – GLOB Patterns and Aliases - bash GLOB patterns (wildcards), `alias, sum` - [Worksheet #05 ODT] online viewing: [Worksheet #05 HTML] – I/O Redirection and Pipes - bash I/O redirection (including pipes), `date, head, nl, tail, tr, wc` ### Optional Bonus Assignments – extra marks - [Assignment #03 HTML] – *Optional* BONUS VIM Text Editor Practice - this is an *optional* worksheet for a BONUS assignment using `vim` - Optional Reading: [The VI (VIM) Text Editor] - [Worksheet #06 HTML] – *Optional* 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. - [Assignment #05 HTML] – *Optional* BONUS Midterm Assignment - This is an *optional* BONUS assignment reviewing your midterm test. - There is a checking script available to verify the format of your file but only people who Read All The Words will find out about it. From the Class Notes link on the Course Home Page ================================================= - Review last week. Did you do everything assigned last week? - See last week for the Midterm Test results. From the Classroom Whiteboard/Chalkboard ======================================== - See last week for the Midterm Test results. - **Take notes in class!** Your in-class notes would go here. - This week (Week 7) has a holiday Monday; the College is closed; no classes. Some students will miss their Monday lab, but can attend any other lab. (You can always attend any other lab.) In Week 7, section 010 Theory class 4pm Friday is cancelled (to match the section 020 Theory class missed on Monday); section 010 students come only to the Wednesday theory class. - Students who don’t do the worksheets or don’t have their own list of commands and what they do are wasting huge amounts of time struggling with the assignments, trying to complete them using Google. Most everything you need to know is in the worksheets and class notes. - Quick review of commands used in worksheets: - copying a directory - review difference between `cp -r dir1 dir2` and `mkdir dir2 ; cp -r dir1 dir2` - the `hostname` command shows your computer’s local name - the `whoami` command shows your userid - the `wc` command has useful options to limit output - the `locate` command finds file names using an existing list - the `cut` and `awk` commands select fields in lines - Using `-ls` instead of `-print` with `find`, e.g. `find . -ls` - what is the difference between `grep` and `fgrep` ? - No man page for `bash` built-in commands `cd`, `alias`, `history`, etc. - use the `help` built-in command: `help alias` - Echoing command lines into files (instead of using a text editor) can be tricky. Suppose we want to save this command line: `date | wc >out` into a file named `cmd.txt` by using `echo` to echo it on the screen, and then redirecting the output into a file once what we see on the screen is correct. You can’t just put the word `echo` in front of the first command in a shell pipeline; it won’t echo the command line to the screen correctly. You have to quote all the shell metacharacters first: - `echo date | wc >out`     # doesn’t work; no output on screen - `echo 'date | wc >out'`     # hiding metacharacters does work – command appears on screen - `echo 'date | wc >out' >cmd.txt`     # correct: saves `echo` output in a file Learning the Material --------------------- - You learn the material because you want to be a Computer Systems Technician. - You like doing this work; you want to be good at it. - Review your mistakes on the first midterm test (questions re-appear). - For practice tests and quizzes, see the [Practice Test README] - Review the commands used in each lab worksheet (and their common options). - [Unix/Linux Command List][List of Commands You Should Know] - Review how the shell works: GLOB, redirection, quotes - Know **why** the shell behaves that way. Copy/paste teaches you nothing. - split on semicolons and pipes first, then do redirection - What are the Four Rules for Output Redirection? Three Rules for Pipes? - [Unix Shell I/O Redirection (including Pipes)] Real Sysadmin Work ================== - [The Evolution of a Sysadmin] ![Take Notes in Class] -- | 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] format [www.idallen.com]: http://www.idallen.com/ [Unix/Linux File System - directories, inodes, etc.]: 450_file_system.html [Hard links and Unix/Linux file system index nodes (inodes)]: 455_links_and_inodes.html [Hard links and Unix file system nodes (inodes)]: 455_links_and_inodesA.html [Unix/Linux Disk Usage, Hard Links, Finding Inodes]: 457_disk_usage.html [List of Commands You Should Know]: 900_unix_command_list.html [Video Tutorials on Lynda.com]: 910_lynda_index.html [lynda.com]: http://algonquincollege.com/onlineresources/mobileStudent/lynda.htm [Unix for Mac OS X Users]: http://www.lynda.com/Mac-OS-X-10-6-tutorials/Unix-for-Mac-OS-X-Users/78546-2.html [Test Instructions]: 000_test_instructions.html [213 practice Midterm Test #1 questions]: practicetest2.pdf [Practice Test README]: PRACTICE_TEST_README.html [download Libre Office here]: 050_course_introduction.html#install-libreoffice-or-openoffice-into-windows [The VI (VIM) Text Editor]: 300_vi_text_editor.html [Unix Shell I/O Redirection (including Pipes)]: 200_redirection.html [The Evolution of a Sysadmin]: https://training.linuxfoundation.org/images/lftc_evolution_sysadmin.jpg [Take Notes in Class]: data/remember.jpg "Take Notes in Class" [Plain Text]: week07notes.txt [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/