Novel Training Techniques: The “Remember” Command

The “remember” command, with the “remember everything forever” options

“Experience varies directly with equipment ruined” was a useful mantra for getting through undergraduate physics labs. And it can be applied in other areas too.

Back in the 1990s I ran a few classes to teach people about Linux. They needed to rapidly understand that with power came immense destructive capability, so with each student on lab PC running Linux, and deliberately logged in as root, we rapidly covered basic shell commands; listing files, navigating around the filesystems, very basic editing using vi and so on. The students began to get used to the highly abbreviated command names for the more common commands (cd, ls, cat, less, vi, grep, top, ps, and so on), and the use of options (especially -h or --help).

Before anyone had a chance to get too familiar and comfortable, we moved straight on to the “remember” command (rm) – obviously for keeping files safe. And with the correct options, to keep the files safe permanently (“Remember Forever” -rf) and a parameter to apply this to all the files (/*)

The students all dutifully typed in the command rm -rf /* and pressed enter.

This was always my favourite part of the class. The looks of horror and realisation slowly spread around the room as the OS tried to delete everything including the running OS. Error messages spewed forth, and the systems ground to an ugly, terminally broken, halt – reminiscent of the song My Grandfather’s Clock.

Having thoroughly trashed all the systems, the next stage of course was to get the students to re-install Linux from scratch as part of getting familiar with the OS.

But they all left the class with a healthy respect for, and good understanding of, the dangers of using privileged accounts, recursive options, and insufficient knowledge or care. After a few hours, they would clearly understand the advantages of unprivileged accounts, how to use the man command to find out what a command does before actually using it, and how to test shell scripts using constructs like /bin/bash -nv scriptname to show what commands a script would run without actually running them.

Now then… anyone want me to deliver a training course in practical parachute maintenance….?

Leave a comment