Accidents Will Happen 21
DOS and Windows give you something more like a sewage line
with a trap than a wastebasket. It simply deletes the file, but if you
want to stick your hand in to get it back, at least there are utilities
you can buy to do the job. They work—some of the time.
These four problems operate synergistically, causing needless but predict-
able and daily file deletion. Better techniques were understood and in wide-
spread use before Unix came along. They’re being lost now with the
acceptance of Unix as the world’s “standard” operating system.
Welcome to the future.
“rm” Is Forever
The principles above combine into real-life horror stories. A series of
exchanges on the Usenet news group alt.folklore.computers illustrates
our case:
Date: Wed, 10 Jan 90
From: [email protected] (Dave Jones)
Subject: rm *
Newsgroups: alt.folklore.computers^2
Anybody else ever intend to type:
% rm *.o
And type this by accident:
% rm *>o
Now you’ve got one new empty file called “o”, but plenty of room
for it!
Actually, you might not even get a file named “o” since the shell documen-
tation doesn’t specify if the output file “o” gets created before or after the
wildcard expansion takes place. The shell may be a programming lan-
guage, but it isn’t a very precise one.
(^2) Forwarded to UNIX-HATERS by Chris Garrigues.