What is the difference between absolute versus relative paths
How are parent directories referenced in the file system?
Given a tree, which file is being reference by a given path?
Draw a file system tree.
Navigation
What is the working directory and how do you display it?
What is the unix standard command to rename a file?
What is tab-completion?
What unix standard will show you the text of a file?
What does grep do?
How do you change the working directory to your home directory?
What is the unix command to delete a file?
How does the implementation of deleting a file work? Does it remove
the file’s contents from the storage medium?
Processes, advanced
processes?
How do you redirect standard (out, in) of bash command to a file?
For instance, if I want to redirect grep’s (out, in) to the file
grep.txt what should I type?
How do you redirect standard out from one command to another
command’s standard in? For instance, let’s say I want to count the
results of find with wc; what should I type?
Editor
How do you edit files with vim or emacs (pick one)?
How do you save a file in vim or emacs (pick one)?
How do you quit the editor vim or emacs (pick one)?
Build automation
What does the (target, recipe, prerequisite) of a makefile rule
do.
By convention, what does the clean target do?
Here is a makefile, add a clean target to remove the binaries.
Write a Makefile that will create a program called
hello from two source files, main.c and
hello.c, when make is run.
Version control
What git command copies commits from the local repository to the
remote repository?
What git command copies commits from the remote repository to the
local repository?
What git command stages a new file?
What git command creates a log of the change to a staged file to the
local repository?
File syscalls
Using the open syscall (man 2 open, not fopen) to open a path given
in the string char *filepath variable.
How do you check for and terminate the program on an error with
opening a file?
Using the read syscall (man 2 read, not fopen), you already have an
open file with the file descriptor stored in fd, read the first 200
bytes of the file and print it to stdout
What syscall can you use to find the (size, number of hard-links) of
a file?
What syscall can you use the find the name of a file?
Write a code snippet that will print all files in a given directory,
except do not print the “.” and “..” names
Process, pipe, syscalls
Write code that uses unix standard syscalls to create a new process
that runs the ls command.
Write code that creates a new process, where the original process
writes “parent” and the new process writes “child”, both to stdout.
Write code that replaces the current processes running program with
the stat/ls command (not the stat syscall).
Write a program that opens a pipe and reads to and writes from
it.
Write a program that redirects the standard output to a file called
“output.txt”.
Source code to processes
Know each phase of the toolchain, what it does, and their ordering:
preprocessing, compilation, assembly, linking, loading
Compiler basics
Understand the purpose of a grammar
Write or use a grammar
Hand-write a simple compiler or interpreter in C
Arithmetic
Understand and write both Slang and assembly code for
arithmetic
What assembly instructions perform arithmetic?
Write equivalent assembly code
Write equivalent Slang code
Branching
Understand and write both Slang and assembly code for branching
What assembly instructions perform branching?
Write equivalent assembly code
Write equivalent Slang code
Pointers
Understand and write both Slang and assembly code for pointers
Write equivalent assembly code
Write equivalent Slang code
Use the register indirect addressing modes in x86 64 to implement
Slang pointers
Functions and their
implementation
What are the contents of the stack frame in the x86 64 System V
ABI?
How are parameters passed in the x86 64 System V ABI?
How are variables represented and accessed in memory?
How is the stack frame managed?
What do the prologue and epilogue do?
How are values returned from a function in the x86 64 System V
ABI?