Updated: 2012-03-15 07:06 EDT

1 Tests and Exams Index up to index

1.1 Most difficult questions on Test #1 Index up to index

Here is a version of Midterm Test #1 (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.

2 Lecture Notes for This Week Index up to index

2.2 From the Classroom Whiteboard/Chalkboard Index up to index

2.2.1 Topic: studying the material Index up to index

  • Review your mistakes on the first midterm test.
  • See the Practice Midterm Test #2
  • Review the labs, especially the commands used in each of the labs and in the Unix/Linux Command List
  • 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

2.2.2 Topic: Common Misunderstandings Index up to index

  • 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

2.2.3 Topic: Applications Index up to index

  • See 3.3 Examples of simple pipes in Unix Shell I/O Redirection (including Pipes)
    • 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
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