Undergrad thought he had mastered Unix in weeks. Then he discovered rm -rf

Uni sysadmin who ran the lab he erased was a big part of the problem Who, Me? Another Monday and what a fine one it is here in the lair of Who, Me? – the reader contributed column in which your fellow Reg-admirers admit to the moments they messed up the tech they were supposed to tame....

featured-image

Who, Me? Another Monday and what a fine one it is here in the lair of Who, Me? – the reader contributed column in which your fellow Reg -admirers admit to the moments they messed up the tech they were supposed to tame. This week, meet a reader we’ll Regomize as “Miles” to told us he cut his computing teeth on the Commodore C64 and various versions of DOS – so when he arrived at University he looked past the Macs and PC clones in the computer department’s labs and honed in on the NeXT Cubes. For those of you who’ve ignored or forgotten the Jobsian Sagas, NeXT was the company started by Steve Jobs in the time between his ejection from Apple and later triumphant return.

One of Jobs’ creations was the Cube, a workstation-class machine that legend has it was used by Tim Berners-Lee to create a little thing you have heard of called The World Wide Web. Miles liked the Cube. “Running at a blistering 25 MHz, these things were quick and had an amazing GUI,” he reminisced.



“But for command-line junkies, these were dreamy because you could Telnet into them from the campus dial-up service and work in the marvelous universe of a BSD Unix command line.” Miles needed to get up to speed with this environment, but quickly became enamored of the tcsh shell and soon figured out how to access the Cubes from his dorm room. “I could sit in comfort writing papers using LaTeX in emacs,” he told Who, Me? He could also access printers in the computer lab, so his Uni work looked great.

Best of all, Miles could log into any of the 16 NeXT machines in the lab, because home directories were accessible from any. There was just one problem. Emacs would save backup files into odd locations, filling directories with documents Miles felt he would never need again.

At the time of this tale Miles was a young man and like many of that ilk, not fussed about tidiness. But decided that learning how to clean things up in Unix was a good place to start. “I was intrigued to try out a new thing I learned about tcsh : the .

logout script. Placed in your home directory, the script would automatically execute upon logout.” Miles hatched a plan to use the script to automatically remove all those Emacs backup files.

“Who needs backups anyhow?” he rationalized. Miles’ version of the .logout file included the notoriously dangerous rm -rf ~* command, which erases everything it can find in a user’s home directory.

“I was a quick learner of this Unix thing” Miles told Who, Me? So he felt sure his script would do the job. That confidence was quickly shaken the first time he logged out with the script in place because it took “longer than I expected it to. A lot longer.

” Miles soon realized that his .logout file was busy deleting every user's home directory and all they contained – not just the temp files he hoped to remove. “As it turned out, the campus sysadmin hadn't really spotted this potential peril, and realized I had more privileges than I should have,” Miles wrote.

Fortunately, that same sysadmin did believe in backups. “After restoring the files he modified permissions. Lessons were learned all around, I retained my account access after a well-deserved slap on the wrist, and I even became a sysadmin as a student job .

.. on AS/400s.

” Has a little knowledge got you into lots of trouble? Don’t be shy: click here to share your story with Who, Me? so we can let your fellow readers learn how you escaped your mistake. ®.