Some practical notes from CS160A (Greg Boyd's Linux course at CCSF)

CS160A and CS160B are two half semester-long courses at CCSF. I had a rough start in CS160A with all the nuances of regular expressions and various UNIX/Linux commands. Kicking off CS160B has given me some time to reflect on some of the high level guiding principles as well as the practical aspects to help complete CS160B homework assignments / exams.

Of course, what I really want to do is introduce the use of Raspberry Pis! There are plenty of fun things to do with these little pieces and they become the perfect platform to practice basic Unix/Linux knowledge on.

A seminal course at UIUC (my alma mater) was the ECE110 (now ECE210) course which at the time involved using logic to navigate a car around the race track. The course is now revamped to use arduinos:

  • ECE110 taught with Arduino medium
  • CS107E at Stanford is taught with Raspberry Pi as the medium and has some great resources at github

CS160B Lecture Notes - Week 1

Practical Pointers from UNIX/Linux Basic Review

This is in conversation to comments reflecting on Greg Boyd's CS160A course from Dave Brown last class.

File Permissions

For a fairly comprehensive exercise on file permissions, go through gboyd's Permissions Exercise and take a look at his comprehensive notes on permissions.

umask can be a fairly tricky topic without a good understanding of binary masking. See wikipedia for a good explanation.

Wildcards, Basic Regular Expressions (BRE) and Extended Regular Expressions

For a particular explanation of the difference amongst wildcards, BREs and Extended Regular Expressions, check out gboyd's notes here. Here are some common mixups:

  • Regular expressions are usually denoted with single quotes when using a command like grep
  • Wild cards have to describe an entire pattern whereas regular expressions denote a specific pattern to match
  • The same character means different things. A common character that causes mixup is the '*'. wildcard [a-z]*.txt says starts with a lower-case letter followed by "anything". In a RE, the '*' is an operand which denotes 0 or more of the preceding character.
  • The character ^ at the start of a string or start of a line behaves as an anchor. But when it is inside brackets: [^inside brackets], it means "not".

Hard links vs. Soft links

Here is a great discussion on Hard links vs. Soft links

Scripts vs. Command Files

gboyd has a great explanation of the difference between script files and command files

Linux Processes

The illusion of being able to do more than one thing by rapidly switching from one executing program to another. Some of the commands that are useful for this are directives like: ps, top, jobs, bg, fg, kill, killall, shutdown. These processes sit in the /etc partition of the file system. In

That beautiful case above is made by

Written byadmin

Documenting makes the mundane seem interesting. Interesting matters seem to demand attention on their own.