- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
The rm command will fail because that file is gone. (Or if someone else is also running a long-running rm then the rm file is still there but the link to it is gone.)
Admin
By the way, IBM invented the abbreviation[*] for Permanent Temporary Fix before Unix or MS-DOS or any of those other latecomers ever existed.
[* For those who want to use the word acronym for abbreviations that aren't words, feel free to call PTF an acronym.]
Admin
Well, at least you have this web-posting as documentation for your script :)
Admin
This reminds me on a kludge I wrote for a occasionally used script, a dirty small Y2K fix. The script was used for a software that was already almost outdated in the end of the last millenium. But in january 2010 it was against all expectations still used, and suddenly it did not run correctly. At first, I thought the reason was, that it was written in Perl 5.005, but after a long day I found the lines I changed 10 years ago. The lines were commented too. From me:
now we have a Y2K10 problem :-)
Admin
Look, before there was MS-DOS, Before there was Unix, Before there was MVS, we used OS-MFT, or OS-MVT. There one used 'IEFBR14', which in its original implementation the one instruction program had a bug (didn't specify the return code).
Look, it was the 60's. If you remember it (some is still fuzzy to me) you weren't there, but we did put a man on the moon!
Admin
Admin
There were just as many bugs back in the day. Thank you for reminding me that some of them didn't get fixed, too. IEBGENER abended with 0C4 for me.
Admin
Actually it stops at rm /bin/rm.
I did that as an intern on System V release 4.
Admin
Actually it was
rm -rf .
I didn't realise I was in /
Admin
Doing 'sudo rm -rf /*'' on a production server doesn't 'pale in comparison' with anything. It's wrong on sooo many levels.
Admin
depends on the system. On linux (which is obviously the case here), when you unlink a running executable, it is still running and still present on the filesystem (but invisible in the directory tree) until its file handle is freed. THEN its 'really' removed. So rm -rf / really removes everything up until it starts doing bad things inside kernel filesystems maybe.
Admin
Wrong again, even though the shell and rm are still running, they aren't present in the directory tree already so someone else can't log in after the shell is removed. Even though they physically exist on the filesystem for their open file handles, you can't access them outside that in a normal way. As far as the directory tree is concerned, they're gone already.
Admin
Admin
Admin
Admin
Admin
If I found that script was taking more than five minutes, I'd update the cron job to make it update at 2AM each night and rename the script "NightlyHousekeeping.bat"
Boom. Now the whole thing looks deliberate and planned. Every programmer who comes after me will say, "Oh, this looks like it should run every night to do maintenance on the data. That seems important, so the programmer must have been competent."
Admin
Ah, the memories this brings back. I recall one of my co-workers saying that these new-fangled PCs were useless because when there was a problem, there was no way to get an ABEND dump.
Hey, remember dropping a job in the hopper, waiting a couple of hours for it to make its way through the queue and run, and then having it fail on some dumb error? Remember working through dumps and disassembling the machine code byte by byte with the help of an IBM Yellow Card? Those were good times.
I recall early on being introduced to the 20-foot-long shelf of manuals. There was one manual that listed all the error messages. Of course back in those days we didn't have messages with text that actually described the problem. There wasn't enough memory in the computer to hold that much text. Instead error messages were like, "IEH2397E", and you had to look them up in a big book. And in that book there were columns for the message code, a description of the message, and what at first seemed like a really helpful column: what to do to fix the problem. Except ... I quickly discovered that about 80% of the time, the helpful hint was exactly the same: "Correct the problem and re-run the job." Like, wow, thanks, I never would have thought of doing that.
Admin
Askimet, how YOU doin'?
Admin
I totally agree in the experience I've had. All code will be a legacy someone else has to carry on. I've also learned there are no temporary fixes or one-offs. They all seem to outlive their intention in production.
Admin
Admin
(I mentioned this a week or two ago. If a numeric field was being compared to a constant string of blanks, or in a valid sign nibble so the numeric field was numeric and would not be equal to the constant string of blanks. If a numeric field was being compared to 0, don't or in a valid sign nibble so the last blank in the numeric field would cause an abend. IBM's Cobol compiler was malicious.)
Admin
You know what, silverdick, you can lick mine from bottom to its top, asshole. I didn't ask you fucking opinion.
Admin
what happens if the cronjob takes more than five minutes to run? won't the second call create inconsistencies?
Admin
what happens if the cronjob takes more than five minutes to run? won't the second call create inconsistencies?
sorry about first post, wrong button.
Admin
Get this, O Inconsistent One (first "vereor", now "secundum"; ya got Dissociative Identity Disorder?): you post here, in public -- you leave yourself open to responses, for good or ill. By offering your own opinion, you thereby, at least implicitly, "ask for opinions".
<waves hands in sorcerous gestures> "Troll(er), begone!"
Admin
FTFY
Admin
Never did: sudo rm -rf / Only did: sudo rm -rf /lib Which might be worse in that it leaves some hope of recovery. Technically at least the data was OK.
Admin
For sane use of history, you can always type Meta-^ (or ESC, ^) to see the expansion.
To do this for you automatically, just put this in your .bashrc:
Admin
The word "bricking" means it wasn't reversible.
Admin
does anybody else find the quotation marks around each paragraph unbelievably grating and impossible to read?
oh yeah that's the real wtf captcha: suscipere
Admin
Admin
If they have sudo configured to allow rm on a production machine, I think they should blame the admins, not the new guy or intern!
Admin
Someone will make the company a lot of money someday when they find that little program and rewrite it or delete it.
Admin
When quoting several paragraphs, only the last paragraph should have a quotation mark at the end. The rest only have it at the beginning. As it is currently, it looks like each paragraph is being quoted from a different person.