Updated: 2015-10-12 11:32 EDT

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

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

  1. Week 05 Notes HTML – this file – Read All The Words
  2. Unix Shell I/O Redirection (including Pipes)
  3. Linux and Sysadmin News in the World
  4. List of Commands You Should Know – keep a notebook!
  5. Video Tutorials on Lynda.com – tagged by week number

1.2 Assignments this weekIndexup to index

Check the due date for each assignment and put a reminder in your agenda, calendar, and digital assistant.

1.2.1 WorksheetsIndexup to index

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 teach you how commands work. Worksheets are not for hand-in; they are not worth marks.

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.

1.3 Lab work this weekIndexup to index

1.4 Upcoming testsIndexup to index

Read the Test Instructions (all the words) before your midterm tests.

  1. First Midterm test: 45 minutes; in lecture class Friday in Week 5 (Oct 9)
  2. Second Midterm test: 45 minutes; in lecture class Friday in Week 9 (Nov 6)

Tests take place in class in your one-hour lecture hour, not in your lab period.

1.4.1 Midterm Test #1 – October 9Indexup to index

  • Midterm #1 takes place on Friday, October 9 (Week 5) in your scheduled lecture hour (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 answers, your lab (not lecture) section number, and the test version number 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.
  • A set of practice questions and answers for the first midterm test is posted: Practice Tests and Answers.
    • The tests use the semicolon ; to separate multiple commands on the same line, to save space and paper, e.g. three separate commands can be written on one line like this: date ; echo "hi" ; ls
  • Blackboard has some quizzes taken randomly from the practice test. See below.

1.4.2 Quizzes: Midterm #1 QuizIndexup to index

This quiz is one of several quizzes in this course. See last week for the details.

3 From the Classroom Whiteboard/ChalkboardIndexup to index

3.1 Why take notes in class?Indexup to index

Take notes in class! A student writes:

But for the note taking, I personally find that without my laptop in front of me I am more focused on the teacher. Also with taking the notes by hand I find that the information that is presented to me in the lectures is remembered much easier.

But I do have my ipad in front of my with the class notes. This also helps me follow along with the examples that you present in class.

Also sometimes I read over the class notes after the class and fix my notes with anything that was missed.

3.2 Read All The WordsIndexup to index

3.3 Missing lectures: save one hour to spend threeIndexup to index

Students who save an hour by not attending a lecture usually end up spending three hours trying to answer assignment questions that I gave the answers to in the lecture. Work smarter.

3.4 Fifteen minute rule – REMINDERIndexup to index

READ THIS: This is a repeat of what I told you back in Week 3:

Your time as a student is valuable. If you come up against a tough problem and make no progress in fifteen minutes despite your best efforts:

  1. get help from a professor or lab instructor
  2. get help from classmates
  3. take a break
  4. put it on hold and work on something else

This happens to all of us, and we need to watch out for it when it happens.

Be especially careful if you find yourself trying to solve a problem with online searches, since those searches will return answers irrelevant to the assignment. Read and search the course notes; don’t waste time searching the entire Internet.

3.5 Wasting your time with online searchesIndexup to index

I watch students trying to solve assignment problems using online searches for answers. They may end up using commands we haven’t even covered yet:

Sorry, I dont know what sudo does; was getting help online to find files.

If you look at the List of Commands You Should Know that is given in the weekly readings every week, you will see that we never use the sudo command, so you should not be using it. Don’t use commands that you haven’t learned yet.

Also, you must never use any command that you don’t understand, even if you get it from the course notes or a worksheet. You risk deleting all your files if you use commands you don’t understand.

If you use online help, you will find thousands of complex wrong ways to do things. If you read the course notes, not Google, you will find a simple, right way.

You only need to use the commands we’ve learned so far in the course notes and the worksheets. That is all.

3.6 Working Smart under LinuxIndexup to index

Growing up under Mac/Windows, you are accustomed to having to “go to” a folder to make any changes to files in that folder. This leads to some inefficient behaviour under Unix/Linux, because Unix/Linux can operate on any file in any folder without having to “go” there:

The “Windows/Mac” way to create a file under a/b/c/d/date.txt:

$ mkdir a
$ cd a
$ mkdir b
$ cd b
$ mkdir c
$ cd c
$ mkdir d
$ cd d
$ date >date.txt
$ cd

The Unix/Linux way:

$ mkdir -p a/b/c/d
$ date >a/b/c/d/date.txt

The “Windows/Mac” way to rename a file under a/b/c/d/date.txt to be old.txt:

$ cd a
$ cd b
$ cd c
$ cd d
$ mv date.txt old.txt
$ cd

The Unix/Linux way:

$ mv a/b/c/d/date.txt a/b/c/d/old.txt

The “Windows/Mac” way to delete a/b/c/d/old.txt:

$ cd a
$ cd b
$ cd c
$ cd d
$ rm old.txt
$ cd

The Unix/Linux way:

$ rm a/b/c/d/old.txt

Using Unix/Linux pathnames, you can work faster, and all your commands are saved in your history for modification and re-use.

3.7 Useful Command to extract fields from lines: awkIndexup to index

The oddly-named awk command can extract a field, by field number, from one or more input lines. See using awk to select fields.

3.8 Current Working Directory StackIndexup to index

The shell built-in command pushd works like cd to change the current directory, but it saves the previous directory on a stack and lets you type popd to return to the previous directory. You may find this saves you some typing. See the shell man page or use the help built-in.

3.9 Attacks on the Course Linux ServerIndexup to index

4 Locked out of Course Linux ServerIndexup to index

Don’t do this:

Sep 30 12:33:50 Invalid user Patrick from 99.240.239.9
Sep 30 12:33:58 Failed password for invalid user Patrick from 99.240.239.9
Sep 30 12:34:35 Failed password for invalid user Patrick from 99.240.239.9
Sep 30 12:35:11 Failed password for invalid user Patrick from 99.240.239.9
Sep 30 12:35:14 Failed password for invalid user Patrick from 99.240.239.9
Sep 30 12:44:13 refused connect from cpec8be198f774b-cmbc140127c8b0.cpe.net.cable.rogers.com (99.240.239.9)

Or this:

Oct  4 21:11:01 Failed password for pate0377 from 99.224.164.198
Oct  4 21:11:10 Failed password for pate0377 from 99.224.164.198
Oct  4 21:11:27 Failed password for pate0377 from 99.224.164.198
Oct  4 21:11:48 Invalid user pate0037 from 99.224.164.198
Oct  4 21:12:10 Failed password for invalid user pate0037 from 99.224.164.198
Oct  4 21:12:37 refused connect from cpe00fc8d22a843-cm00fc8d22a840.cpe.net.cable.rogers.com (99.224.164.198)

Or this:

Oct  4 23:34:43 Invalid user martr0991 from 99.245.238.68
Oct  4 23:35:00 Failed password for invalid user martr0991 from 99.245.238.68
Oct  4 23:35:12 Failed password for invalid user martr0991 from 99.245.238.68
Oct  4 23:35:24 Failed password for invalid user martr0991 from 99.245.238.68
Oct  4 23:35:39 Failed password for invalid user martr0991 from 99.245.238.68
Oct  4 23:36:46 Invalid user mart091 from 99.245.238.68
Oct  4 23:36:57 Failed password for invalid user mart091 from 99.245.238.68
Oct  4 23:37:07 Failed password for invalid user mart091 from 99.245.238.68

Or this:

Oct  4 20:27:51 Invalid user lavi2078 from 70.26.160.194
Oct  4 20:28:18 Failed password for invalid user lavi2078 from 70.26.160.194
Oct  4 20:28:29 Failed password for invalid user lavi2078 from 70.26.160.194
Oct  4 20:28:47 Failed password for invalid user lavi2078 from 70.26.160.194
Oct  4 23:43:39 Invalid user lavi2078 from 70.26.160.194
Oct  4 23:43:55 Failed password for invalid user lavi2078 from 70.26.160.194
Oct  4 23:45:09 refused connect from bas1-jockvale05-1176150210.dsl.bell.ca (70.26.160.194)

Or this:

Oct  5 01:36:50 Invalid user  from 70.55.30.201
Oct  5 01:37:03 Failed password for invalid user  from 70.55.30.201
Oct  5 01:37:06 Failed password for invalid user  from 70.55.30.201
Oct  5 01:37:30 Failed password for invalid user  from 70.55.30.201
Oct  5 01:37:32 Failed password for invalid user  from 70.55.30.201
Oct  5 01:38:17 refused connect from bas2-kanata16-1178017481.dsl.bell.ca (70.55.30.201)

4.1 Lock-out is not an excuse for non-submissionIndexup to index

A student writes me the night before the assignment is due:

I locked myself out of the CLS. I cant hand in my assignment because of this.

You can. As it says in the Course Linux Server notes, you can submit your assignment from any other IP address. If you’re locked out of home, go somewhere else to submit. You can always submit from school.

Working from home is a privilege. If you abuse the privilege and lock yourself out, go to school.

5 Go VOTE – a public service messageIndexup to index

Students are VOTING!

Students are VOTING!

Stakes are high for young people: VOTE!

Stakes are high for young people: VOTE!

Students are VOTING!

Students are VOTING!

Rick Mercer says young people must VOTE (link to CBC radio)

Rick Mercer says young people must VOTE (link to CBC radio)

 Take Notes in Class

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

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