Undergrad Thought He Had Mastered Unix In Weeks. Then He Discovered Rm -rf
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” who told us he cut his computing teeth on the Commodore C64 and various versions of DOS – so when he arrived at University he felt his command line interface skils were strong, ignored 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.
- The sad tale of the Alpha massacre
- Relocation is a complete success – right up until the last minute
- I made this network so resilient nothing could possibly go wro...
- Linux admin asked savvy scientist for IT help and the boffin blew it
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. ®
From Chip War To Cloud War: The Next Frontier In Global Tech Competition
The global chip war, characterized by intense competition among nations and corporations for supremacy in semiconductor ... Read more
The High Stakes Of Tech Regulation: Security Risks And Market Dynamics
The influence of tech giants in the global economy continues to grow, raising crucial questions about how to balance sec... Read more
The Tyranny Of Instagram Interiors: Why It's Time To Break Free From Algorithm-Driven Aesthetics
Instagram has become a dominant force in shaping interior design trends, offering a seemingly endless stream of inspirat... Read more
The Data Crunch In AI: Strategies For Sustainability
Exploring solutions to the imminent exhaustion of internet data for AI training.As the artificial intelligence (AI) indu... Read more
Google Abandons Four-Year Effort To Remove Cookies From Chrome Browser
After four years of dedicated effort, Google has decided to abandon its plan to remove third-party cookies from its Chro... Read more
LinkedIn Embraces AI And Gamification To Drive User Engagement And Revenue
In an effort to tackle slowing revenue growth and enhance user engagement, LinkedIn is turning to artificial intelligenc... Read more