Terminal
Linux right in this browser tab. Real commands, nothing to install.
Orientation
Where things live and how to look at them.
Open Linux in your browser, count the users in a prepared list, and save the number.
Check a file's size in kilobytes and save a single number.
Count the copies of one process and save the number.
Pick the largest of five files and save its name.
Count how many errors are in the application log and save the number.
3 a.m.
Typical incidents: the broken state is already set up for you. Fix it.
A symlink on the system points at a binary that no longer exists. Fix it.
There's a huge log file in /var/log. Find it and remove it.
A `yes` process is spinning in the background, maxing out a CPU core. Find it and kill it.
The app config has mode 000, nobody can read it. Fix it.
A process is holding a file open, so you can't delete it normally. Find who's holding it and close it.
Text and search
grep, awk, sed, find, pipes. Pull what you need out of logs.
Save only the ERROR-level lines from a log to a file.
Replace a value in a config with sed, without opening an editor.
Add up the numbers in a column with a one-liner using awk.
Remove all .tmp files from a directory, leaving everything else in place.
Get a sorted list of unique words from a file.
Bash scripts
Scripts you won't be embarrassed to put in /opt/scripts.
Create an executable script that prints hi.
Accept an argument in a script and write it to a file.
Read numbers from a file, add them up, print the result.
A script that behaves differently depending on whether a file exists.
Declare a function and call it with an argument.