Updated: 2017-10-01 17:23 EDT

1 ELECTED Student Class RepresentativesIndexup to index


You will elect a student Class Representative from among your classmates in each of your CST8207 theory classes on Monday September 11 (section 010 and 030) or Tuesday September 12 (section 020). (That’s one student representative elected in each section.)

Students who would like to be candidates for election must be ready to put forward their names in their CST8207 theory class on Monday or Tuesday this week (Week 3).

Details about why this position is important may be found in the Class Representative Job Description PDF.

You may also examine all the related documents.

2 Readings, Assignments, Labs, Tests, and ToDoIndexup to index

2.1 Read (at least) these things (All The Words)Indexup to index

  1. Week 03 Notes HTML – this file – Read All The Words
  2. File System and Pathnames – ROOT, absolute, relative, dot, dot dot
  3. Directories: ROOT, /root, HOME, /home, and current
  4. Searching for and finding files by name, size, use, modify time, etc.
  5. For next week: Shell GLOB patterns (wildcard pathname matching)
  6. List of Commands You Should Know
  7. Video Tutorials on Lynda.com – tagged by week number
  8. Linux and Sysadmin News in the World

2.2 Assignments this weekIndexup to index

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.

2.3 Lab work this weekIndexup to index

2.3.1 WorksheetsIndexup to index

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. Worksheets. 3. Assignment.

Make notes from the worksheets on how each command works. What do the options used in the worksheets mean, for each command? (See the weekly Command List.)

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.

These first two worksheets require you to have read File System and Pathnames:

Worksheets prepare you for the upcoming assignments.

2.4 Upcoming testsIndexup to index

For full marks, read the Test Instructions (all the words) before your midterm tests. Put these dates into your phone! Use the Algonquin Registered Name Game link to test your name before the test. I don’t answer questions about the instructions during the test.

  1. First Midterm test: 45 minutes; in your one-hour lecture class on Thursday or Friday in Week 5 (October 5 or 6).
  2. Second Midterm test: 45 minutes; in your one-hour lecture class on Thursday or Friday in Week 9 (November 2 or 3).

Tests take place in your 50-minute lecture class, not in your lab period. Each midterm test is 45 minutes long and contains approximately 45 multiple-choice questions similar to those found in Practice Tests and Answers. You must write the test in the lecture class in which you are registered.

2.4.1 Midterm Test #1 – October 5 or 6Indexup to index

  • Midterm #1 takes place on Thursday or Friday, October 5 or 6 (Week 5), in your scheduled lecture class (not in your lab period).
  • For full marks, you must read the Test Instructions before the test for important directions on how to enter your name, student number, answers, your lab (not lecture) section number, and the test version code on the question sheet and the mark-sense forms.
  • There may be more questions on the test than you can answer in the time allowed; answer the ones you know, first.
  • I will post a set of practice questions and quizzes for the test soon.

2.5 Assignment #2: Read All The WordsIndexup to index

Please Read All The Words.

3 Notes from the ClassroomIndexup to index

Pathnames Diagram on Whiteboard

Pathnames Diagram on Whiteboard

3.1 Drawing File System DiagramsIndexup to index

Draw File System Diagrams on paper to understand where files are when you do the worksheets, the assignments, and the tests and exams!

See the note in Assignment #03 HTML about drawing file system diagrams on paper. Do it!

3.2 Did not change password – CLS access revokedIndexup to index

Students will have their CLS accounts disabled if they have not changed their default password. (I do not want people breaking into my machine because of you.)

See my online timetable for how to make an office appointment to see me if you want your account back.

3.3 Fifteen minute rule: don’t waste your timeIndexup to index

See the Course Introduction: fifteen minute rule

3.4 Commands UsedIndexup to index

Keep a notebook with a List of Commands in it.

  • You need to write down yourself what each command does.
  • Check the updated list of commands each week.
  • I will check for this list in your lab periods.
  • Bring your notes to class! Stop wasting time looking up commands.

3.5 Not Reading All The WordsIndexup to index

These do not produce the same output file:

$ find . >foo ; mv foo dir/foo
$ find . >dir/foo

If the assignment asks you to redirect the output into a file in a specific directory, then only the second answer above is correct. The first answer, using mv, will have the wrong pathnames in it.

3.6 Working hard, not working smartIndexup to index

3.7 Not doing worksheets: working hard, not smartIndexup to index

This student below (from a previous term) didn’t do the worksheets and doesn’t know about any options to the mkdir command. Instead of typing one command to make the directory tree, he has to use ten (!), and gets the name wrong, too. He also didn’t hear me talk about not using cd all the time, so he marks himself as a Windows newbie. This won’t look good in a job interview:

$ mkdir 1ldIr
$ cd 1ldIr
$ mkdir one
$ mkdir two
$ mkdir one/0neOne
$ cd one
$ ls
$ cd ..
$ ls
$ mkdir two/tw0two

Don’t be this guy. No employer wants to pay you to type ten commands when one will do the job. Work smarter, not harder. Do the worksheets!

4 Attacks on the CLSIndexup to index

Commands to show the number of locked out IP addresses and attempts to use locked-out IP addresses in /etc/hosts.evil:

$ wc /etc/hosts.evil
$ fgrep -c 'refused' /var/log/auth.log
$ fgrep 'refused' /var/log/auth.log | less

Count the unique locked-out addresses, and then show the top twenty:

$ fgrep 'refused' /var/log/auth.log | awk '{print $NF}' | sort -u | wc
$ fgrep 'refused' /var/log/auth.log | awk '{print $NF}' | sort | uniq -c | sort -nr | head -n 20

Password failures:

$ fgrep -c 'Failed' /var/log/auth.log
$ fgrep 'Failed' /var/log/auth.log | less

Userid failures:

$ fgrep -c 'input_userauth' /var/log/auth.log
$ fgrep 'input_userauth' /var/log/auth.log | less

You can use the whois command on Linux to identify which country is responsible for an IP address, or use a Web Whois Lookup.

The Linux whois command is blocked from use at Algonquin College, except if you are on the CLS. You can’t use the whois command in your own Linux machines while you are on campus. Use whois on the CLS or do a lookup via the web interface instead.

5 Locked out of the CLSIndexup to index

When you are locked out, follow the directions in the notes to get your IP address re-enabled.

Take Notes in Class

Take Notes in Class

Ian! and the Pathnames Diagram

Ian! and the Pathnames Diagram

Author: 
| 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

Campaign for non-browser-specific HTML   Valid XHTML 1.0 Transitional   Valid CSS!   Creative Commons by nc sa 3.0   Hacker Ideals Emblem   Author Ian! D. Allen