- 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
Admin
Worked on a tech support line once.
The most frustrating call I ever got:
A user had deleted a file. Being in the heyday of MS-DOS, she had heard of a way to "undelete" files. Not knowing exactly how, she adventureously looked thru the DOS command directory, and found a program that sounded about right - RECOVER.COM. She ran it, specifying the lost file, and hoped to see her lost file again.
Ooops.
RECOVER does not undelete files. RECOVER presumes that the entire directory tree has been irrevocably corrupted, and _without_asking_ trashes said directory tree and rebuilds it from the FAT table ... and names _every_ file FILE0001.REC, FILE0002.REC, ...
Everything was there and in place. All files were intact. The entire directory structure was correct. It's just that every file _name_ had been wiped.
Frustrating? everything was there; we just had to figure out every file's name. Got backups? no. Figured rebuilding all from scratch was faster. Hello FORMAT.COM...
Admin
Nobody have seen the movie office space? Those companynames sounds familiar :P.
Btw, nice movie ^^
I've done something like that about 6 months ago. 24:30 oclock. little typo: rm -r / (had to be ./). Hmm, why is removing that tiny dir lasting so long?
Admin
I used to work as helpdesk/sysadmin at a university. I had to have root access to certain solaris servers. When I left for the day I had the (bad) habit of typing 'kill -9 -1'. Which works fine until you find out you typed that in the terminal connected to the file server.....The upside is we had a good system which recovered itself, so the only damage was people not being able to do any work for 30 minutes at the end of the day. You know, when students finally decide to show up and do something.
Admin
For some reason, this is the thing that's blowing my mind: by the time she's old enough to be able to grok the concept of data communications, she will have no concept of line noise.
My memories of MUSHing over a 4800 baud connection are my only relics of a time long passed.
Admin
You must be new here. Those company names are the defacto for anonymizing an entry, to the point where it's not mentioned, it's expected.
Admin
*.dbf?
*.idx?
FlagShip homie!
Captcha: knowhutimean
Admin
I've done something nearly as stupid. Trying to move files from one drive to another, using two term windows, and forgetting which window I was typing in... I moved files off the good drive, and then reformatted the slowly-going-bad drive. Doh!
Admin
Rule number 2 of consulting has to be 'if you don't recognize what you're seeing, STOP'. I could list countless times where I witnessed and/or had to stop someone mid-destruction of a system because they were just making on-the-fly judgement calls, all of which wrong, in order to continue progress on some procedure when they should've stopped at the first thing they didn't recognize (i.e. jumbled characters, odd prompt, etc).
Admin
Hopefully, I'll always remember to 'test' a command with echo when I use wildcards:
--Jim
Admin
my wife recently sold her old ibook. I told her to delete all her files after she transferred everything to the new computer.
So she dragged /Applications into the trash.
Wiping the drive and reinstalling was a better idea anyway :)
Admin
Ah, yes. I was bitten by this one myself while logged into a Unix shell account from a Windows machine whose command prompt I was also using.
It's very easy to get the differences of Windows and Unix syntax a bit muddled in such an arrangement.
In Windows, "copy \otherdir\*" copies everything from otherdir to the current directory.
In Unix, "cp /otherdir/*" does what's described in the quote above.
Which is not good when the first file in /otherdir/ is a compiled Java class from a homework assignment, and the second file is its source code whose backup is seriously out of date...
Admin
That Unix probably understood -i; it likely didn't understand argument reordering.... -i needed to come first.
Admin
That is why modern Linux systems have sash. It is not dynamically
linked and has lots of useful builtin commands. As long as you don't
delete sash you can usually recover.
Admin
While everyone's sharing their 'oops' moments:
UPDATE important_table SET status=[aborted status] WHERE id-123456;
The simple substitution of - for = has the amusing effect of setting the abort status for every row EXCEPT the one you wanted to update. I painted my - key lumo green after that.
We've been thinking of having a panic button fitted to everyone's desk for such situations - locks the developer's keyboard, sets off some flashing lights over their head, and snaps a picture of their ashen face for later posting to the Hall Of Shame blog.
Admin
WOW. Just Wow.
I never realized MySQL was so helpful. Well, maybe not exactly helpful, more like evil.
I'll definitely read my query strings much closer now. Thanks for the tip.
SE*
Admin
I remember once effectively (but temporarily) hosing a box by untarring a tar archive in the root directory. The problem was, the tar archive contained '.' and had permissions drwx------, which pretty much blocked access to every file on the system to all non-privileged processes. Weird things started happening immediately, but being root, it didn't affect me, and I didn't notice them for a long time.
Admin
OK, here's another not-so-horrible-but-embarrassing story. I wrote a program on VMS to monitor the amount of time users were logged in, and log them off if they had been idle for 30 minutes. The system had lots of users and this was to free up resources. It would give them warnings at 5 minutes and a few after that.
The code was straightforward. The system wakes me up at time T, I check everyone's idle status, send warnings, kill off processes, then ask the system to wake me up again at time T + one minute.
One user went off to lunch and left his terminal paused. Ie, type Control-S to prevent output from scrolling, Control-Q to resume (similar on many systems). My software decided to send him a warning message. But it couldn't because the terminal was paused and his buffer was full. So my software blocked until he came back from lunch and typed Control-Q. (this was all figured out from detective work afterwords)
At that point the software proceeded to log out everyone in the building. Lots of phone calls ensued. The culprit, was the "wake up at T + one minute". So the software wanted to wake up at 12:00 but couldn't. When it finally wake up, it asked to be woken up at 12:01 (even though it was really 12:45), so the system resume my program immediately. Then it asked to be woken up at 12:02, 12:03, 12:04, etc. Whoops...
So the lesson I've never forgotten: always wake up at "current time + delta", never "last time + delta".
(I also fixed up the paused terminal problem)
Admin
Admin
My big whoops was the time that the "build manager" of the company (the only person who was set up to be able to build ALL of our code.. really) asked me to shut down this magical machine because they had to leave early and the machine needed to be shut down gracefully before a scheduled power outage.
At the end of the day I started a shutdown but it took for ever. I eventually got so impatient waiting for it to finish that I just yanked the power cable out of the back of the PC so I could go home.
Next day, the thing wouldn't boot and had to be rebuilt. The whole company lost a day or so of work because of this.
The build manager knew it was my fault but didn't tell anybody, I don't think.
Admin
QFT
It may be dumbed down, window-ish behavior, but it sure cuts down on a LOT of errors that using scripts, wildcards, etc. creates.
Admin
Back in the early 1990's, there was a little goodie for UNIX called Columbia AppleTalk that would expose selected UNIX directories as Macintosh directory shares, and manage all that resource fork mish-mash. We used it to edit source files "locally" on the Mac, while doing compilation and SCM on the UNIX box. Mind you, this was back in the day when RCS held sway...
Our working directories had a softlink named 'RCS' that pointed back to the main SCM repository. When mounted on a Mac, this link showed up as a normal folder.
I had just finished some kind of prototyping work, and wanted to blow away the entire working directory and restart from scratch. I started to drag the working folder into the trash... And abruptly stopped myself. The Mac would be doing directory enumeration and deletion. Supposed it followed that softlink into the SCM repository? After thinking about it, I concluded that, for disaster to strike, two things would have to happen:
Since two bad things would have to happen, and both of them seemed unlikely, I concluded I was safe. I dragged the folder to the trash and emptied it.
Bad gamble.
The Mac happily followed the softlink, since it was indistinguishable from a normal folder. And Columbia AppleTalk, at that time, wasn't really observing account permissions and blithely deleted the repository files.
Mere minutes later, the guy in charge of the repository was roaming the halls looking perplexed. I immediately confessed and related my logic. He agreed it was faultless, had it not been for some inconvenient facts. Happily, he was a very capable guy and had backups, so we lost minimal work.
Admin
Nobody seemed to mention the beauty of mounted network file systems. You don't even have to be root :).
I once deleted half of corporate smb share mounted into one of the temporary folders I was going to cleanup. I understood that something is not right when rm started giving access errors with
/home/user1/temp/folder1/sharepoint/long/path/deep/into/the/network/drive/very_important_file_1
Good thing there were files I couldn't delete, otherwise I wouldn't even have noticed.
Edit: shares were actually mentioned while I was typing. Oh well :)
Admin
This forum, as in many forums, has a "captcha', a script that is supposed to block spam robots by asking for some "intelligence" of a poster, namely being able to decode a word. In general it helps a little, not really keeping out a persistent spammer, but adding a small hurdle to make posting here a touch harder and hopefully make the spammer go elsewhere. There are some really horrible programs that add fuzz and color changes, making it harder for an OCR program to scan the image. The problem is it's sometimes hard for a real person to use.
on this forum, the captcha's are a rotating list of terms you're likely to hear on the forum, e.g. brillant, Paula, enterprisey, and the like. the captcha is just a minor inside joke, and you mention it.
captcha: quality
Admin
Back around 1999 Solaris used to do this kind of thing all the time. I also got used to checking /etc/passwd, /etc/vfstab, etc for appended-on garbage, which was another Solaris bad habit.
Hasn't happened to me in a long time.
Modern, file systems like VXFS just disappear the file with no trace, the way it's supposed to be done.
Admin
That's actually a very good practice.
I learned to respect asterisks the hard way.
Admin
If you have remote desktop, you have tsshutdn, which is what you should be using. It doesn't have all the shutdown options, but it has all the basics, including remote shutdown, and it's cancelable with a control-c (eg, it's blocking). There's no dependency on having the adminpak in the path, and especially far less chance of god knows what else calling itself shutdown and installing in the systemroot...
Admin
Couldn't close them remotely. The remote desktop was launched from a citrix console, and was inaccessible directly from our workstations. But yes, it could be a good idea to have a ctrl+c interface instead of an unclosable windows counting down from 30 to 0.
Admin
It's was not the nic, "ssh server <command>" actually starts a shell on the other side and the shell doen't pick up the stdin stream, what you need is a program that can read stdin and then redirect *it's* stdout to a file - e.g "pg_dumpall -c | bzip2 | ssh server 'cat - > data.bz2'". The original command actually only creates an empty file on the remote server :-)
Admin
Hmmmm.... just why any savvy unix admin/user always uses this instead...
cd /var; tar cf - ./ | (cd /tmp/newvar; tar xf - );
echo $?
And if $? == 0 then mount /tmp/newvar as /var and rm -rf /oldvar..... (or whatever names you like :-)
Wonder if this guy thought to use that method in his nifiy/difty script? tar up the gobbledygook files and move them that way?
Obviously not.
Admin
This WTF reminds me of the following:
Once, when I was young and caught in the middle of a big heap of WTFery I had some fault in, my boss at that place comforted me with a story that dated back to his young years when memory was still extremely short...
At the end of a 2-year project, shortly before his well-earned vacation, he was left to save the project on a tape (to be sent to the customer) and to backup it on another tape, then delete it from the machine to make space for the next project. So he saved the project on one tape, copied that tape to another tape, and deleted the project from the machine.
For some reason, he then wanted to have a last look on the content of the tape that was to be sent to the customer. It was completely blank. In panic, he examined the backup tape. It was also completely blank.
So, what had happened? Well, he did not copy the full tape to the empty one, but vice-versa. Needless to say, that his well-earned vacation was cancelled and several months followed packed with overtime.
Morale? For me in that situation: It could be worse... far, far, far worse.
Admin
And all of a sudden, I understand the reason for the Windows message "Directory has been cloaked. This folder contains files that ensure the integrity of the system. You should not mess with these files."
So yes, there *are* users who need that. >_<
Admin
Some years ago I was sitting at a user's MS-DOS desktop investigating an application error.
I thought I'd have a look at the files in the directory using dir:
C:\CRITAPPL>del *.exe
hm.. No response..? Are there any other file in this dir?
C:\CRITAPPL>del *.*
hm.. Still no response.. But wait.. ! Holy crap!
Fortunately where was a recent backup.
Admin
While this isn't applicable to shell scripting, the "best practice" for rm is to do it first with ls, look at the output, then hit up and replace ls with rm.
Admin
These weird name files that you can't even type into the shell is the only reason I have 'mc' (midnight commander, think dosshell/norton commander) installed. Load that up, select the file and delete it. Maybe 'rm' needs a '-n' parameter for deleting by inode. They are device specific, though, so I guess you need something like: "rm -n /dev/hda2:#234824". (ls -i gives inode numebrs).
Admin
Admin
Hmm, is this because savvy unix admins like to be overly verbose?
tar c -C /var . | tar x -C /tmp/newvar
You know, LILO and GRUB have this funny feature which allows you to install several kernels side by side. Wonder what that's good for. :-)
Admin
There is such an SQL server, Interbase-Yaffil-Firebird... it has (had) some nasty habits.
Beeing a versioning engine, it can made inconsystens tables.
Say, ALTERing column adding NOT NULL check over a million-records of which some share really has NULL value in the column for months/years.
Then, the backup wents ok, since why this check should be trigerred in reading the data ?
Then the restore, trying to fill the table, triggers the chack - and here we have it, unrestorable backup.
Or personally i made in Interbase 5 go mad, when added external DLL function, and then made virtual COMPUTED-BY column dependent on this function over the column. When restoring, Interbase recreated tables.... untilk he met this table, which it could not restore since it restred external functions far after the tables themselves.
So, while backups are realy well squeezed by removing all redudant things like indices and recreatiung them on restore, if needed, they are not guaranteed to succed.
But indeed, who reads FAQ when he is administering database ?
Worse that, until fixed in recent Firebird, Interbase-Yaffil-Firebird need not some specific option to rewrite the existing files, leeding to the obvious scenario:<b>
Restore failed. Database killed.Admin
One more great MySQL gotcha!
Again on IB/Ya/FB:
Imagine attempt to duplicate some table or some records in it.
Maybe strange but valid requests with a little typo are easily turned into which makes the server continuously append just-created records to the database, then find the clones and append it again, and again...
until disc runs 100% filled, or (novadays)... until the dtabase file grows over 4GB means that (in Interbase 6-) it wraps and new records are added from the very beginning of the databse file.
CAPTCHA: clueless - yes, just about the stories above!
Admin
Too funny, this had me on the floor!
Admin
Wow, today's story is just a rewrite of this old thing.
WTF indeed.
Admin
Admin
I once ran many queries on SQL server, had to do some checking or something to that degree (don't remember exactly). I had a few tabs open in SQL Server Studio and switched between those, running nothing but SELECT statements. But one tab had a DELETE statement, which I executed very early in the day and had completly forgotten about. One time I had a "mouse slip" and selected the wrong tab. Since all I did in the past few hours was running SELECT statements I accidentally ran the DELETE statement again, this time without a WHERE clause. :(
Lucky for me, we had a daily backup of the database, so I could restore most of the table and only one day of work was wiped. But it's still not a good feeling if you realize that you fucked up and there's NO way of hitting an "undo last action" button.
Another time I too ran into the "UPDATE without a WHERE clause" trap. "SET Street = 'different Name'". Great... but again, the backup saved me. phew
Admin
pharmacie en ligne fiable https://kamagraenligne.com/# Pharmacie sans ordonnance