Learn › Linux Foundations › Reading Files
cat - a hands-on Linux lab on a real virtual machine.
The Reading Files module capstone mission. Drill cat, tac, head, tail, less, more, wc, file, stat, du, df, hexdump, and xxd in one hands-on intercept on a real Linux VM. Mission mode: no commands shown, recall required.
You have finished the Reading Files module. Every tool you need is already yours: the ones that print a file whole or in reverse, the ones that peek at the top or the bottom, the pagers that let you scroll a long file, the counters that measure it, and the tools that identify a file, weigh it on disk, and read its raw bytes.
This is the final run. One real machine, thirteen objectives, and every one of them uses a skill you already trained. Nothing new is introduced here.
This is mission mode. No commands are shown. You read the objective, recall the tool, and type it. That recall is the whole point: it is how reading files becomes second nature. Progress checks itself as you go, and a signal is one click away if you get stuck.
Two quick reps in the practice terminal before the real intercept boots. These boxes are a safe sandbox with a sample messages.log in them; each box only checks the one tool you recall. Same rule as the mission: the goal is stated, the command is not.
First rep. Print the whole file messages.log to the screen, start to finish.
prompt: student@linuxcamp:~$ answer: cat messages.log output: line 1: system boot line 2: loading kernel modules line 3: network interface up line 4: mounting filesystems line 5: starting services line 6: user student logged in line 7: running diagnostics line 8: ready hint: The three-letter tool that concatenates a file to the screen. Give it the filename.
Second rep. That file was short. Now print only the first 3 lines of it, the way you would peek at the top of a huge log.
prompt: student@linuxcamp:~$ answer: head -n 3 messages.log output: line 1: system boot line 2: loading kernel modules line 3: network interface up hint: The top-of-file tool, with -n 3 to cap it at three lines, then the filename.
Both came from memory. cat for the whole file, head -n 3 for just the top: the exact instinct the intercept needs, where some files are one line and some are thousands. Thirteen objectives on the live machine next, all in this same shape.
Both reads came from recall, not a copy button. That is what the mission demands, thirteen times over: print whole and reversed, peek at top and bottom, page through the long ones, count them, identify them, weigh them on disk, and read their raw bytes.
Boot the machine below and decode the intercept. The files live in the intercept folder in your home directory: logs/, intel/, and binaries/. No commands shown, progress checks itself as you type.
Practice Operation Signal Intercept in a real Linux terminal at The Linux Camp. Progress is verified automatically as you type commands on the machine.