• SomeCoder (unregistered)

    The worst I've done was this:

     One day, I needed to poke around in the database (I was DBA + developer on an internal project management tool) because of some problems.  I quickly saw that some of the data was incomplete for whatever reason.  Simple enough fix, I just needed to do an UPDATE on it and voila, problem would be solved...

     ... EXCEPT that instead of saying UPDATE Table SET field = 'NewValue' WHERE field = 'OldValue' I accidentally wrote the following gem:

     UPDATE Table SET field = 'NewValue'

     Without a transaction...

    On the production server (of course I use the term "production" VERY loosely here.  We didn't have a development server and the product was very young at this time.)...

     And.... at that point in time, the database wasn't being backed up yet.

    Luckily it didn't hurt much (like I said, the product was very young and still under development) but I made double sure to wrap everything in a transaction.  Though sometime later I did the exactly some thing and committed the transaction.  Luckily by then, the database was being backed up religiously so it only wasted an hour of my time to restore the back up.

     You can be damn sure that before I do anything to a database, I double and triple check my queries now and usually get someone else to look at them too :)

     Captcha = Paula.  Yeah, I felt about as brillant as Paula after that.

  • (cs) in reply to WWWWolf

    The biggest lesson it can teach is extremely relevant to this story: Be Damn Careful With rm(1).

    Actually one of the things I've learned the hard way is "Be Damn Careful With Wildcards(*)" - lots of commands make changes to files, and a * in the wrong place is sure to mess things up.

    - I've had to reinstall a couple of times due to this, and now always test which files my wildcards will match with ls (or, occasionally, tar), before doing anything "dangerous", like rm, chmod or mv. Burnt, now shunning the fire.

  • Rich (unregistered) in reply to SomeCoder
    Anonymous:

    Luckily it didn't hurt much (like I said, the product was very young and still under development) but I made double sure to wrap everything in a transaction.  Though sometime later I did the exactly some thing and committed the transaction.  Luckily by then, the database was being backed up religiously so it only wasted an hour of my time to restore the back up.

     

    Two words:

     

    Transaction logs.

     

    Saved my life a few times and much more lightweight than a full backup.

     

    Rich 

  • (cs) in reply to Rich

    I was once helping (read: watching - i'm a linux noob) a workmate set up a desktop as a local development server using Fedora Core 4. We'd spent a few hours backing up the files on what used to be a Windows machine, installing Linux, then setting it up as a webserver so we could work from it, but we ran into a problem when the apache service couldn't access the files in the /var/www/html folder. Aha! We forgot to change the owner from when we copied from the old server. No worries, we'll just run this command (apologies if this isn't right - it was a while ago):

    chown -R apache: .*

    basically, recursively change the owner of all files in the current directory (.) to apache. what we didn't realise is that ".*" matches ".." so it recursively started changing the owner of every file on the entire disk. "Gee this simple command is taking some time to run...", we thought. Then we realised what we'd done. "Crap! Um... er.... change the owner back to root!"

    chown -R root: .*

    Needless to say, we had to reformat after that.
     

  • Muhahahaha (unregistered)

    Several years back, in my last year of university, I accidentally typed 'rm prefix ' instead of 'rm prefix' and wiped out all of my ray tracer source files - the final project for my graphics course - the day before they were due.  Fortunately the system (University of Waterloo SunOS boxes) made periodic automatic snapshots, but I lost the past few hours work.  Fortunately I still had the images I'd generated, and I was able to restore many of the lost changes from memory. But it's never the same as it was before you lost it.

  • Kjartan (unregistered) in reply to Rich
    Anonymous:

    Tip: don't run shit as root if you're really really tired.  Possible additional WTF: How did he get root on a production system if he didn't understand UNIX?

     

    captcha: tps.... go Initech
     

    To quote one of my teachers in University "No good decisions get made after midnight!" This does not neccesarilly mean that he didn't understand UNIX he probably did, but was too tired too make smart decisions, in this case the smart decision would have been to go home to sleep and clean up in the morning.

  • SomeCoder (unregistered) in reply to Rich
    Anonymous:

     

    Two words:

     

    Transaction logs.

     

    Saved my life a few times and much more lightweight than a full backup.

     

    Rich 

     

    Too true but this was back when I was a fairly green DBA.  Ah, nothing like learning on the job! :)

     

     

  • (cs) in reply to Rich

    I hosed a collocated server once by uninstalling the openSSL package.  It turns out nothing useful will run if openSLL isn't up.  No apache, no mysql, no ssh, no wget, no lynx, no package manager...

     So I was stuck.  I couldn't create any new SSH sessions, I couldn't download anything, and I couldn't get the package manager up.  And the server was 60 miles away.  Fortunately, there wasn't anything actually *running* on the box yet, so we just had the hosting company format it.  Again.

    I've dropped a couple live databases in my time, too.
     

  • (cs) in reply to rp

    Anonymous:
    I once hosed a Solaris box in the same way.  The problem is with /lib rather than /bin.
    E.g. on my Linux prompt I see:

    % ldd /bin/sh
    linux-gate.so.1 => (0x0026f000)
    libtermcap.so.2 => /lib/libtermcap.so.2 (0x004e2000)
    libdl.so.2 => /lib/libdl.so.2 (0x003e0000)
    libc.so.6 => /lib/libc.so.6 (0x0028e000)
    /lib/ld-linux.so.2 (0x00270000)
     
    (For you Windows people: an *.so.* file is a .dll, and ldd lists the ones an executable depends on.
    These days, pretty much every executable depends on at least /lib/libc.so.6 so you only have to rename that file in order to to completely break your system.  In running shells, only the built-in commands will still work, so you can still do echo * to list all files in a directory, but there isn't usually a builtin for file renaming.

    So what you do is reboot from another medium (floppy or something) and repair it that way.  This is standard sysadmin procedure.  I agree with a previous poster, the real WTF is to grant someone like Paul, who has no idea what he's doing let alone how to fix it, root access to a business critical Unix system.

    Or set LD_LIBRARY_PATH to be "/oopsdir/lib:/oopsdir/usr/lib" etc etc...

     

  • Stephen Touset (unregistered) in reply to skippy

    skippy:
    Similar to that, I've done my share of "whoops".  I wrote the install/uninstall of our software and we had it set up to (stupidly) recursively delete the install folder when uninstalling.  Of course you can imagine what happens in that directory is "\".  You'd be amazed how quickly you can delete files on a windows machine when you aren't waiting for that stupid progress bar in Windows Explorer.  Luckily we only had to rebuild two developer machines.  I think the next day we all starting using VMWare for doing testing :P

    This reminds me of a (sadly) common shell scripting fuckup. In many install/uninstall/maintenance scripts, you'll see a construct like:

    <code>rm -r ${INSTDIR}/bin</code> 

    Which, of course, completely trashes the /bin directory if the shell variable isn't set. Oops.
     

  • mastmaker (unregistered)

    A Microsoft employee once told me that releasing Windows ME was the biggest mistake Microsoft ever made. I wholeheartedly agree.

     Once I tried to install ME on a (home) machine that was running XP on another partition. The bootup screen asked me: "Are you sure you want to install ME?" Once I agreed for that, it knocked off ALL the partitions in that hard disk and proceeded to format it. I was horrified and pulled the plug, but the damage was done. The only important (and irreplaceable) thing on that machine was a Microsoft Money file. I spent two days trying to recover it before I discovered Active Undelete. I gladly paid them $30 for a license.

  • (cs)

    Well, I see two WTFs here.

    1: Why wasnt there a daily backup that could be restored, if it was so enterprisy?

    b: Why were there those strange filenames if the system was so enterprisy?

    and on the other hand the destruction of the system doesn't seem too bad to me, I mean it probably was a giant WTF for itself... 

  • ajk (unregistered)

    Well I think we have all screwed up a production system in our careers, best way to learn about backups :)

     

  • (cs) in reply to ajk

    BAD: accidentally sending six weeks of work to the great beyond.

    WORSE: discovering your backups haven't been working for eight weeks 

  • (cs) in reply to mastmaker
    Anonymous:

    A Microsoft employee once told me that releasing Windows ME was the biggest mistake Microsoft ever made. I wholeheartedly agree.

     Once I tried to install ME on a (home) machine that was running XP on another partition. The bootup screen asked me: "Are you sure you want to install ME?" Once I agreed for that, it knocked off ALL the partitions in that hard disk and proceeded to format it. I was horrified and pulled the plug, but the damage was done. The only important (and irreplaceable) thing on that machine was a Microsoft Money file. I spent two days trying to recover it before I discovered Active Undelete. I gladly paid them $30 for a license.

    That is not specific to Windows ME. Raymond Chen explains.

    Yeah, it sucks if you've been bitten, but can you be sure you wouldn't have made the same decision?

     

  • newt0311 (unregistered) in reply to WWWWolf

    thus my reason for making root as hard to work with as possible in my linux systems. no aliases, very basic path entries, no custom completions, ugly PS1 etc. give myself a good reason for not doing anything as root. won't prevent me from hosing my own files but atleast I can't destroy the entire system that way.

  • (cs) in reply to evanm

    evanm:
    Nice story. I think a better title would have been "/r♥??& can't be an important file"

     

    But /r♥??& wasn't an important file!

     

  • (cs) in reply to Dark
    Anonymous:

    It's exciting, but not as exciting as the "paste entire terminal history as input" mouse click combination that was easily triggered by accident on certain SunOS systems :)

     

    Hell, I still manage to do that in PuTTY (click-and-drag = copy, right-click = paste) every so often.

     

    I think the closest I ever came to destroying an OS was back around 1993.  IIRC, some of us were trying to adjust <a href="http://vigor.sourceforge.net/"> this guy's </a> Solaris server to use shadow passwords; we kept getting expected-int-got-void errors (or was it vice versa?), and brillantly decided that the proper response was to edit the source code so it returned int.  Fortunately, we gave up before we got it to "work".

     

  • (cs)

    It's pretty clear to me that line noise wasn't the problem. The poor ERP system was experiencing plain old, honest-to-goodness, finger lickin' good file system corruption.

     The first thing you have to realize is that in Unix systems your filesystem is represented by three different components (primarily).

    • Inodes, which are fixed sized entries in a table near the beginning of the partition (or spread out through it) that describe every file and directory on the system. But they have no names, only numbers, and they are primarily to server as anchors to the pointers to the data on disk. They also hold the file permissions and modification times. Compare to the MFT on NTFS.
    • Regular file blocks... these are pointed to by inodes of the type 'file'. Some regular file blocks are actually lists of other file block offsets, and these are pointed to by special pointers in the inode... this allows for very long files spread out all over the disk by using multiple layers of indirection.
    • Directory blocks ... these are pointed to by inodes of the type 'directory'. They are typically implemented as straight-concatenated pairs of binary inode numbers and 0-terminated, C-style strings or pascal-style strings with a length prefix. They map a file name that appears in a directory with the inode number that corresponds to it. Your root directory is at a known offset number in the inode table, so you can get at the top level file and directory names and know what inodes those are at boot time... say to find /sbin/init!

    That line noise looks like the side-effect of a directory block gone horribly corrupt, or a corrupt block pointer in the directory inode itself pointing off into never-never land ... as the kernel tries to parse it, it somewhat succeeds, referencing a non-existing inode number (side effect, meaningless 000 permissions and link count, zero size, etc.) and returning random garbage as the name (could be pointing at anything...) which gobbles up the rest of the block and never returns another entry since it didn't find what should have been the end of the filename... it ran out of directory blocks first (as inodes record a size in blocks, even for directories).

     Whatever caused that corruption could still be present in the underlying datastructures of the filesystem. This would explain why it never acted the same way, and they would still appear later, or why files would disappear or have bizarre attributes for no reason.

     A good old dump -> format -> restore would have fixed the problem.

     

  • DoomCoder (unregistered) in reply to emurphy

    I think the new Windows Shell, "PowerShell," has an option to do a "what-if" command.  Of course, user idiocy easily overrides such things.

    captcha: mustache - everyone's favorite kind of ride

  • Matt (unregistered) in reply to savar

    Re. the feeling of dread. As a kid, I had access to a PC with a DOS disk (no hard drive), so I decided to try all of the commands to see what they did. After FORMAT A: had successfully completed, nothing else seemed to work. The person I went and explained this to, must have had that same feeling :)


    It happened to me once too: I ran Doom2 on a friend's newly-purchase Windows 3.11 doublespaced PC. It corrupted the doublespace. Whoops.

     BTW (this is my first post here) does the "CAPTCHA Test" always say "stfu" ?

     

  • aedinius (unregistered)

    I had two mistakes that were painful at a Code Monkey/IT Support/Company Tech type job I had.



    Someone had requested I get the wireless working again on our site's little Cisco router/access point. Something went wrong (Still don't know what) and I started getting phone calls from off-sites and people coming to my office asking why our email, internet, and practically everything else went down. It took me several hours at work, and then a few more hours at home until my girlfriend suggested restoring the router's config from a backup. "I wish I could, but I don't have a back--" and then I noticed an odd file on my desktop. I uploaded that file to the router and things were working again, including wireless.

    And my personal favorite: The internet at this place was always going down, usually requiring after a release and renew from the  WIndows workstations (the Linux machines didn't seem to have this problem), or in worse cases a reboot of the router or something similar. We also had  issues with the Windows machine, where it would stop listening to any connections without issue. Our Master Architect had decided that besides hooking up the domain controller to a keyboard and monitor, no users (including the local administrator account) should be allowed to login locally. The fix that had to be employed several times was as follows:

    1. Shutdown domain controller.
    2. Install PCI network card.
    3. Boot domain controller.
    4. Check DHCP server to see what IP address was grabbed.
    5. Login over terminal services and re-enable the on-board NIC
    6. Shutdown and remove PCI card.
    7. Reboot
    8. Pray.
    I think to this day that that server still suffers from this.
  • techphile (unregistered)

    As I am sure others have posted this would not have been such a big deal if they had a good disaster recovery scheme implemented as well as backups.  Neverless Paul should have been more careful, sometimes its' easy to be to clever by half.

  • Anonymous (unregistered) in reply to Renan renan_s2

    You're kidding me. I did the exact same thing with Slackware 10.2 I also forgot to enable support for usb too. (was using a usb keyboard at the time)

  • Billy Oblivion (unregistered) in reply to newt0311

    Anonymous:
    thus my reason for making root as hard to work with as possible in my linux systems. no aliases, very basic path entries, no custom completions, ugly PS1 etc. give myself a good reason for not doing anything as root. won't prevent me from hosing my own files but atleast I can't destroy the entire system that way.

     

    I have in the past gone so far as to make roots prompt a different color (red) to remind me where I am and what I'm doing.

     

    These days I spend most of my as root on other peoples systems over webex, so I've just gotten REALLY careful.

    It's like carrying a loaded gun, you don't pull the trigger in less you really mean it. You don't even put your finger ON the trigger unless you really mean it.

     

    Oh, and to the induhvidual who said something about some versions of rm having a built in safety? No, that's just Redhat protecting the masses from themselves. man alias.
     

  • (cs)

    I once had the opportunity to watch a co-worker/superior enter the following:

      > mv /etc /etc-orig

    Intending to make his next command

     > mv /etc.backup /etc

    Thus restoring the backup he had carefully made a before, in case his changes didn't work.

    It was during the recovery of that server that I learned how to boot from the installation media, mount the drive and affect the necessary fix. Ah... the memories of being a virgin Unix admin... um... er... never mind.
     

     

  • (cs)

    We were working on-site with a US Air Force customer. One of our VMS admins was troubleshooting a problem on an important operational system. He thought he was working in a temp directory that he had created, and ran

    $ delete [...]*.*;*

    Well, it turned out that he was working out of [000000] (that's "six balls", or root for you Unix weenies!) so it started deleting everything on that device. We knew we had a problem when one of the operators (a enlisted US Air Force guy) said to his CO: "Sir, I think our system is under attack!"

     
    So next time you fsck up, remember that at least it isn't perceived as a threat to national security. :)

     

  • (cs) in reply to ajk
    Anonymous:

    Well I think we have all screwed up a production system in our careers, best way to learn about backups :)



    I remember that day i had to reinstall a windows 2003 file server. The customer didn't have tape backup but USB hd backups.
    Well, no big deal, i checked the full backup ran successfully, ok, reboot the server with install CD, acept license, delete the bazillion of partitions, select partition to install ... WTF ?
    Why is there 3 choice, i thought thay had only 2 disks ??
    ...
    ...
    Unplug backup USB drive .. start installing windows and meanwhile go to internet for a partition recovery tool .. and keep smiling.
  • (cs) in reply to Martian

    I had a similar problem upgrading my libc. It got halfway through the installation, and got to the point where it installs /lib/ld-linux.so.2 and /lib/libc.so.6. Since the installer is a Makefile, it has to copy them one at a time with the install command. The dynamically linked install command. So, after copying ld-linux.so.2, I now had the ld-linux.so.2 version 2.5 and libc.so.6 version 2.3, which aren't binary compatible. So, no dynamically linked programs can start, and I don't have a statically linked copy program. I had to boot Knoppix just to copy one file.

  • Paul (unregistered)

    Years ago, when I was first getting comfortable with manual MBR/LBR editing, I was trying to fix some corruption on a friend's drive in DEBUG using the int 13h API. Typically, it goes something like this: 

    mov ax,201 
    mov bx,200
    mov cx,1
    mov dx,180
    int 13
     
    g=100 10e

    Except I accidentally typed 301 instead of 201, which writes a sector instead of reading it. Today I probably could've recovered from that mistake, but not then -- it was over.

  • (cs) in reply to Billy Oblivion
    Anonymous:

    I have in the past gone so far as to make roots prompt a different color (red) to remind me where I am and what I'm doing.

    I think this is a very reasonable thing to do.  Gentoo has it set up that way by default; I get "evan@localhost ~ $", where evan@localhost is green, if I'm logged in as a user, and "localhost ~ #", with localhost in red, if I'm root.

     Mandrake took it one step further and made the X background dependent on if you were root. Normal users would get a typical background, root got a red gradient.

    I've borrowed the idea even for my Windows box on campus where I work/go to school (grad student) and I set my admin background to red.
     

  • (cs) in reply to DoomCoder
    Anonymous:

    I think the new Windows Shell, "PowerShell," has an option to do a "what-if" command.  Of course, user idiocy easily overrides such things.

    And *nix has this handy command "echo". As in running

    $ find blah [...] -exec echo rm {} \;

    and seeing it outputs what you *really* want it to delete before running

    $ find blah [...] -exec rm {} \;


  • Fred Trellis (unregistered)

    O. M. F. G.

     

    Please can someone explain what this "captcha:" thing is about on so many posts?

     

    Regards, Fred.

  • Liz (unregistered)

    Back in the good old MS-DOS days, I set a machine up for someone at work. Although he could use the mainframe quite happily, he was not very experienced on PCs. I came in one day to find him unable to boot, the machine was just saying no command.com could be found.

    Him: Why doens't it boot? It worked yesterday.

    Me: What were you doing?

    Him: Well I was deleting files in my directory.

    Me: Which ones?

    Him: Well I did find a . and .. file. I didn't know what they were, so I deleted them..... 

     Of course, his directory was immediately below c:\ so he had deleted everything at root (command.com. autoexec.bat, etc)

    Moral: Don't delete files - or anything else - that you don't understand.

  • (cs)

    Before Windows - in the DOS era - I once decided to clean up the workstation's harddisks by running the defrag tool that came with Dos 5. You had to do that once in a while just to speed up things.

    I copied the defrag tool to a disk because not all workstations had a complete set of DOS files. Everything went well until I came to a computer that was slightly older... The defrag reported errors, the computer froze and after a restart it wouldn't come up again. Apparently, that machine still had a DOS version prior to 3.3 - which meant it used a different file system (FAT 16 instead of FAT 32)... I didn't know this (at least not before I had the problems) and defrag didn't check it. It just assumed FAT 32.

    And thus I had removed all letters that had ever been sent, including the templates for them. There was no backup - except for a printed version in the archive.

    Luckily my boss' response very reassuring: "This could have happened to everyone, don't worry about it"... Phew

     

  • (cs) in reply to darin
    darin:
    But trying to do things logically when you're panicked and talking to a tech over the phone is not so easy.

    Yepp. Thats the real "wtf". Sh*t happens. But try to fix the problem in a panicked mind is more dangerous than anything else. First rule if an big mistake happens: Go out for an coffee, discuss the problem with collegues and DON'T touch the keyboard anymore. ;-)

    I think that must Admins once did this kind (and similar) of mistake too. So they wont be that upset. ;)

    Regards.

  • (cs) in reply to rycamor
    Anonymous:

    "FrankenUnix"

    That alone got a prolonged laugh out of me.
     


    Hmm sounds like a good name for a new unix to me.
  • Freaky (unregistered) in reply to Dazed

    Unixy filesystems tend to support fairly arbitary filenames; to the point at which you have a reasonable chance of creating a file named after a line read from /dev/random:

    -rw-r--r-- 1 freaky freaky 0 Nov 16 10:19 \004\321\352\271l\017\220\026n\320\005\253>k\023\226\035\235GU\177y\353\3252Q\216X\243[\341\232\276\274;\231\376\223\357\355K^u\221\234\270\262\r\364U\340\2616!\250\241c|\204\200nT\352\3557\324&W\273\250n\333\324<vl\005C\362\356|\016\274?o)\236\363\262#\350\265\035PI\252\345\200\355q\006\324\264
    Or if you neglect to escape it:
    ôUà±6!¨¡c|„€nTêí7Ô&W»¨nÛÔ<vlCòî|¼¿ï©žó²£èµÐɪå€íñ†Ô´
    ½¾ îéì
    (and now your terminal is probably badly screwed up)

  • Peedeesee (unregistered) in reply to Tachyon

    My favourite on a live system:

    I'm just going to delete the contents of this local directory using 'rm -fr ./*'

    > rm -fr /*

    Err... OOPS!

     > CTRL-C CTRL-C CTRL-C

    Err...

    > ls /

    ls: Command Not Found

    Err....

  • J Random Hacker (unregistered) in reply to batasrki

    batasrki:
    Oh my god. I can feel his dread. The president of the firm brought the server up by himself? That's the real WTF

    The president of the consulting firm tried to personally fix a screw up by one of his consultants in a major project? Chances are the consulting firm is a fairly small business; if you're the president you get to do whatever is needed to keep your business on the rails.

  • (cs) in reply to J Random Hacker

    This reminds me of my own screwup:

    Some years ago I was working on a project that used a Solaris machine as its development platform. One night, I wanted to clean up my home directory. Therefore, I issued the following command:

        chown -r therider *

    When the command prompt didn't return after two seconds, I immediately thought that something must be wrong and hit the Ctrl+C key to interrupt. But too late. I realized that I had been working as root (by doing "su -" sometime earlier) and the current directory at the time was /.

    I was thus now the prowd owner of about two thirds of all files on that machine. Oops! A quick check revealed that I wasn't even able to get a new login prompt. The SSH terminal only displayed some funny error message. It felt like I was being up shit creek.

    I called one of the admins, who were located on another site in another town. Luckily, I could reach one who worked late. I told him what happened. He said: "By all means! Don't close that xterm shell you still have on your screen!". If, for whatever reason, the machine would reboot, then it would go completely haywire. He explained how I could transfer another xterm shell to his workstation and proceeded to write a script that read the backup tape from the night before, and set the file owners of all files on the system to those found on the backup tape. Only a few dozen files were new today and not on the backup tape.

    Hooray! I got away with this. But of course, the next morning, I had to explain to my colleagues, what had happened the the night before. :-)

  • Redshirt Coder (unregistered) in reply to Martian
    Martian:

    We were working on-site with a US Air Force customer. One of our VMS admins was troubleshooting a problem on an important operational system. He thought he was working in a temp directory that he had created, and ran

    $ delete [...]*.*;*

    ... 

    Ouch, that got me mugged down memory lane.

    I once forced down an VMS system by doing, out of curiosity, an "assign sys$output sys$input" (syntax may be wrong, its a long time since and i really try to forget). Well, i was young and in those days we had to make our own WTFs. Like placing a breakpoint in the kernel on a system (RS6000?) currently in use by 20 students, or finding /sbin/reboot being world-execute.

    One VMS admin also did some maintainance on unix boxes and one day he decided to delete old user accounts. He quickly found an account which was never logged into, since day 0. And so he deleted the user, along with his home directory...user was known as "bin".

    And once i felt like i was on user friendly when i was greeted by the console with the message "You do not exist. Go away." Well, next day 120% of the / was in lost+found...

    But after hosing a source one day before presentation by using the remark command (aka rm) in a bad way, i usually FIRST type the files, THEN the -rf (if need be) and THEN, when absolutely sure, i go to col. 1 and insert the 'rm'. 

  • (cs) in reply to Azrael
    Azrael:
    Anonymous:

    "FrankenUnix"

    That alone got a prolonged laugh out of me.
     


    Hmm sounds like a good name for a new unix to me.

    Al Franken is working on that one (in cooperation with Penn and Teller) <tic>

  • (cs) in reply to Tachyon

    Why did he not make a filelist of all the "gobbldygook" files and then rename them programatticly, surely none of the critical files would have obscure characters in them), anyway you could manually review the list beforehand anyway.

  • (cs) in reply to Thanks, but no thanks.

    Anonymous:
    Ah yes. I wanted to clean up a directory and asked how to do a deletion with confirmation since I wanted to get rid of most, but not all, of the files. The resident guru said "rm * -i". Luckily that Unix implementation didn't know what "-i" meant. Rather than complain, it just went with the part it did understand. I've learned to appreciate RSX and VMS.

     Well I don't think rm is meant to interpret flags that come after the filename list ... "rm -i *" might do what you want though.

  • lostlogic (unregistered)

    Couldn't he just have used 'mc' or some other console file manager to remove the files without confusing the hell out of his shell?  That's what I generally do.  Also, on linux/bash at least, I've had luck with <code>rm -- BADANNOYINGFILEHERE</code>.

  • (cs) in reply to welcor
    welcor:

    The biggest lesson it can teach is extremely relevant to this story: Be Damn Careful With rm(1).

    Actually one of the things I've learned the hard way is "Be Damn Careful With Wildcards(*)" - lots of commands make changes to files, and a * in the wrong place is sure to mess things up.

    - I've had to reinstall a couple of times due to this, and now always test which files my wildcards will match with ls (or, occasionally, tar), before doing anything "dangerous", like rm, chmod or mv. Burnt, now shunning the fire.

    Yep. Whenever I run a command that will modify multiple files, I stick an "echo" in front of it just to make sure that variables are being substituted and wildcards expanded like I am expecting. I use this all the time with xargs to make sure I'm not about to make a bonehead mistake on several dozen files at once.

  • DomQ (unregistered) in reply to viraptor
    Big question is, how they were created in the first place? Did they really get noise on line, that looked like "mkdir ðþêóã¬?whatever" ? I'd say the chances were almost equal to "rm -r /", so that wasn't probably this problem. So how could they be created?

    Tip: as stated at the beginning of the article, the process of creating gobbledygook involves the shell and modem line noise. Specifically, line noise that contains the character '>'.

     

  • (cs) in reply to emurphy
    emurphy:
    [

    Hell, I still manage to do that in PuTTY (click-and-drag = copy, right-click = paste) every so often.

    By the way, I think a law should be passed that says all Terminal emulators use the mouse buttons like this. I can't work on any other terminal other than PuTTY anymore without cursing out loud.

  • Kiss me, I'm Polish (unregistered) in reply to snakegamer

    Yeah. That reminds me.

    It's been quite an experience, when we were to install some piece of software back in the days I worked in a helpdesk. We had remote desktops on machines at the client's site, and  the installation involved a reboot. We didn't allow the automatic reboot at the time it was suggested, thinking that running at some free time a simple "shutdown -r -f -t0" issued at the command line would be enough. The standard windows buttons in the start menu just weren't there, because of the remote access policy, so we had to do it manually.

    We just didn't expect that "shutdown" was aliased to something. Instead of a nice, quick reboot, some of the miserable ones that ran this thing saw a dialog box counting down 30 seconds to shutdown, with a comment "-r -f -t0". Sorry, no "shutdown -a" would work - not enough privileges.

    The next thing to do was to call local tech support with a "errrm... could you power on our machines? They're kinda  not responding" sentence.

    Oddly enough, this didn't happen every time, and sometimes you had the chance to issue a quick "shutdown /a" or "shutdown -a" that amazingly did the job of cancelling the whole thing, but before the end of the shift I managed to make a few friends at the local support.
     

Leave a comment on “It Must Have Been Using Those Files”

Log In or post as a guest

Replying to comment #:

« Return to Article