32 Welcome, New User! % cc -o doit.c doit instead of: % cc -o doit doit.c Needless to say I have lost doit.c Is there anyway I can get it back? (It has been extensively modified since this morning). :-( Other programs show similar behavior: From: Daniel Weise daniel@dolores.stanford.edu To: UNIX-HATERS Date: Thu, 1 July 1993 09:10:50 -0700 Subject: tarred and feathered So, after several attempts, I finally manage to get this 3.2MB file ftp’d through a flaky link from Europe. Time to untar it. I type: % tar -cf thesis.tar …and get no response. Whoops. Is that a “c” rather than an “x”? Yes. Did tar give an error message because no files were specified? No. Did tar even notice a problem? No. Did tar really tar up no files at all? Yes. Did tar overwrite the tar file with garbage? Of course, this is Unix.
Error Messages and Error Checking, NOT! 33 Do I need to waste another 30 minutes retrieving the file from Europe? Of course, this is Unix. It’s amazing. I’m sure this misfeature has bitten many people. There are so many simple ways of avoiding this lossage: error reporting, file version numbers, double checking that the user means to over- write an existing file, etc. It’s like they have to work hard to create this sort of lossage. This bug strikes particularly hard those system administrators who use tar to back up their systems. More than one sysadmin has put “tar xf …” into the backup script instead of “tar cf …” It’s an honest mistake. The tapes spin. Little does the sysadmin suspect that tar is trying to read the specified files from the tape, instead of writing them to the tape. Indeed, everything seems to be going as planned until somebody actually needs to restore a file. Then comes the surprise: the backups aren’t backups at all. As a result of little or no error checking, a wide supply of “programmer’s tools” give power users a wide array of choices for losing important infor- mation. Date: Sun, 4 Oct 1992 00:21:49 PDT From: Pavel Curtis pavel@parc.xerox.com To: UNIX-HATERS Subject: So many bastards to choose from… I have this program, call it foo, that runs continuously on my machine, providing a network service and checkpointing its (mas- sive) internal state every 24 hours. I cd to the directory containing the running version of this program and, since this isn’t the development directory for the program, I’m curious as to exactly what version of the code is running. The code is maintained using RCS, so, naturally, I attempt to type: % ident foo to see what versions of what source files are included in the execut- able. [Never mind that RCS is obviously the wrong thing or that the way “ident” works is unbelievably barbaric I have bigger fish to fry…]
Previous Page Next Page