Memra

academic · intermediate · ≈ 15 h · Athabasca University

COMP 325 — UNIX

Live in the shell — 85 lessons across the user's and the programmer's view

A full UNIX course built the way the Athabasca syllabus is split: the User's View first — how the system is put together, how the shell parses a command line, files and inodes and the two kinds of link, globbing and quoting, file security with permissions, `umask` and the special bits, the file-processing toolkit, regular expressions with grep, sed and awk, redirection, pipes and FIFOs, and processes, job control and signals — then the System Administrator's and Programmer's View: Bourne shell programming from variables to traps and descriptor rewiring, the C shell and where it differs, Python 3 as a scripting replacement, then system programming proper — the kernel boundary and the real POSIX signatures, the descriptor table, fork, exec, wait and zombies, reliable signal handling with sigaction, pipes and IPC, and sockets, concurrent servers and the socket arithmetic the assignments ask you to justify. Commands and C are typed for muscle memory; the fiddly deterministic semantics — umask arithmetic, glob expansion, the wait status word — you compute in runnable Python and watch come out right. Every one of the three assignments' questions is reachable from a lesson, and the questions the papers want in prose are rehearsed as written answers you commit, then grade against the marking scheme.

0 / 85 lessons
Reviews stop being scheduled for after it.

up next

What an operating system does

8 m

Start course

The System, the Shell, and the Command Line

0 / 8 lessons
  1. What an operating system does 8 m
  2. The UNIX software architecture: API and AUI 10 m
  3. Three branches, one root, and why POSIX exists 9 m
  4. Anatomy of a UNIX command 9 m
  5. Shells: which one you are in, and how to leave it 11 m
  6. Why you do not log in as root 9 m
  7. Reading the manual, and asking the machine what it is 10 m
  8. Two editors, one buffer 11 m

Files, Inodes, and Links

0 / 7 lessons
  1. What UNIX means by "file" 8 m
  2. Four routes to one file 9 m
  3. The name is not in the file 11 m
  4. Where things live, and what a login line says 10 m
  5. Nine fields and a type character 10 m
  6. When does a file keep its identity? 10 m
  7. Two names for one file, and one name for a name 12 m

Globbing, Quoting, and the Shell Environment

0 / 5 lessons
  1. Making the shell leave your text alone 10 m
  2. Asterisk, question mark, and who actually expands them 10 m
  3. One bracket, one position 11 m
  4. Building a pattern out of position constraints 11 m
  5. Where your shell looks, and where your settings live 10 m

File Security: Permissions, umask, and the Special Bits

0 / 7 lessons
  1. Users, groups, and the three permission classes 9 m
  2. The nine permission bits 9 m
  3. chmod: octal and symbolic 11 m
  4. Permissions on directories 12 m
  5. umask and default permissions 12 m
  6. Symbolic umask, and why 000 is dangerous 9 m
  7. SUID, SGID, the sticky bit, and reading a mode cold 12 m

File Processing: Viewing, Copying, Comparing, Packaging

0 / 5 lessons
  1. Four ways to look, and one that lies 9 m
  2. Copying, moving, removing — and the permissions each one needs 11 m
  3. A difference is a program, not a report 10 m
  4. Three transforms that are not each other 10 m
  5. A shared device needs a queue 10 m

Searching and Filtering: Regex, grep, sed, awk, sort, find

0 / 7 lessons
  1. Regular expressions: literals plus operators 10 m
  2. A glob is not a regular expression 9 m
  3. Pinning a match to a position 10 m
  4. Three tools on one trade-off 10 m
  5. Editing a stream you never open 10 m
  6. Every line is a row of fields 11 m
  7. Keys, adjacency, and an expression language 12 m

Redirection, Pipes, FIFOs, and Remote Commands

0 / 7 lessons
  1. Three files are already open 10 m
  2. The shell re-points a slot before the command runs 10 m
  3. Why `2>&1` has to come last 11 m
  4. stdout of one into stdin of the next 10 m
  5. A pipe with a name on disk 10 m
  6. What the other machine is, and how you name it 11 m
  7. Quoting decides which machine does the work 12 m

Processes, Job Control, and Signals

0 / 6 lessons
  1. What a process is, and how the shell runs a command 11 m
  2. Running a script written for another shell 11 m
  3. Process states and CPU scheduling 10 m
  4. Inspecting processes with ps and top 10 m
  5. Job control, terminal signals, and surviving logout 12 m
  6. The process hierarchy, and hunting a runaway job 11 m

Bourne Shell Programming I: Variables, Arguments, Control Flow

0 / 6 lessons
  1. Running a script, and what a variable really holds 10 m
  2. Unquoted variables, command substitution and the exit status 10 m
  3. export, read, and the child environment 10 m
  4. Positional parameters and shift 10 m
  5. test, brackets and conditional branching 12 m
  6. Loops, command grouping and a complete script 12 m

Bourne Shell Programming II: Arithmetic, Here Documents, trap, exec, Functions

0 / 5 lessons
  1. Because every variable is a string 9 m
  2. Putting a command’s input inside the script 9 m
  3. Ignoring, catching, and cleaning up 11 m
  4. A descriptor is a slot you can rebind 11 m
  5. Subroutines that live in memory 11 m

The C Shell, and Scripting in Python 3

0 / 6 lessons
  1. The C shell dialect: same ideas, different language 11 m
  2. foreach, switch, and one-based arrays 11 m
  3. Start-up files and the exported environment 11 m
  4. onintr, and why C shell scripting lost 10 m
  5. Python 3 when the script outgrows the shell 12 m
  6. Tkinter GUIs in Python 3 12 m

System Programming I: The Kernel Boundary, Files, and Processes

0 / 6 lessons
  1. What happens when you call read() 10 m
  2. The five calls the whole file API is built from 12 m
  3. And that is the whole trick behind dup 10 m
  4. Asking a file about itself 10 m
  5. A call that returns twice, and a corpse that needs collecting 12 m
  6. Replacing the program, keeping the process 12 m

Signals, Pipes, and IPC

0 / 5 lessons
  1. Software interrupts, and the three things you can do about one 11 m
  2. The interface the book never shows 12 m
  3. Two descriptors from one call 12 m
  4. A pipe with a name, and a umask interaction 10 m
  5. Two children, two pipes, syscalls only 12 m

Sockets, Servers, and Concurrency

0 / 5 lessons
  1. Six fields, filled in by four calls 12 m
  2. Why a TCP read must loop and a UDP read must not 10 m
  3. Iterative or concurrent, connection-oriented or not 12 m
  4. Resource arithmetic, and the tool that shows it 12 m
  5. From a toy to something that stays up 12 m
~/memra/learn/comp-325