Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
It's funny.  Laugh. Operating Systems Software Windows Linux

Shootout: 'rm -Rf /' vs. 'Format C:' 513

skyshock21 writes "There's an article over at hohle.net about what actually happens when you type the commands Format C: in windows versus rm -Rf / in Linux. Very interesting results indeed. Myths are busted, and hilarity ensues."
This discussion has been archived. No new comments can be posted.

Shootout: 'rm -Rf /' vs. 'Format C:'

Comments Filter:
  • by molywi ( 136881 ) on Wednesday November 03, 2004 @08:11AM (#10709091) Homepage
    I prefer the magnet or throwing the disk out the window.
    • by Anonymous Coward
      Microwave the drive... works everytime. If the room is dark, you're in for watching some serious fireworks!
    • by 1nhuman ( 597328 ) on Wednesday November 03, 2004 @09:05AM (#10709387)
      Actually a Dutch (national) prosecutor did something similiar a month ago. He thought his HDD failed and put his whole PC with his garbage on the street.

      Unfortunatly a Taxi driver took the PC with him and managed to boot the machine and found an enormous ammount of very confidentinial information on the HDD. Information about some top crime and fraude cases. The Taxi driver then sold this HDD to a dutch TV crime fighter.

      In the end this got the prosecutor fired. Which I think is sort of unreasonable, since the major issue is the justice departments lack of descent security procedure.
      • by Bertie ( 87778 ) on Wednesday November 03, 2004 @11:40AM (#10710528) Homepage
        Why? This guy's in a responsible position, he should be more careful. The buck stops with him.
        • Actually the buck should be passed on to a higher position. It is obvious that the guy wasn't computer savy and didn't have the slightest clue. After all he suspected that the harddrive was bad and threw the entire computer out.

          The real problem here is that A) there wasn't some sort of tech support in place that would have made that decision instead of him. B)There isn't some sort of policy detailing what can be done with the computers or information/storage devices if somethign like this ever did happen.
      • by LaCosaNostradamus ( 630659 ) <`moc.liam' `ta' `sumadartsoNasoCaL'> on Wednesday November 03, 2004 @12:05PM (#10710769) Journal
        Let me see if I understand this ... a Dutch prosecutor put his entire computer out in the trash for anyone to come by and take? Firing's too good for him. Anyone in his position should know security procedures for document handling. Are you sure he didn't break Dutch law?
        • Actually he got another job at the justice dept to make use of his expert knowledge. I'm afraid that my hope that he now is cleaning up the toilets is in vain. The problem is indeed as mentioned; he should never EVER had this information on his home PC in the first place. He mentioned that a virus destroyed his PC. How the hell did he catch a virus on his home PC? Simple. It was directly connected to the internet. They cleaned out his mail account three days afterwards. Tar pit is too good for dinosaurs lik
      • Unfortunatly a Taxi driver took the PC with him and managed to boot the machine and found an enormous ammount of very confidentinial information on the HDD.

        When you throw something in the garbage, it's still yours. It's not free for the taking.

        The taxi driver stole the computer and the "Dutch TV Crime Fighter" bought stolen property. That's criminal.

        • by Le Marteau ( 206396 ) on Wednesday November 03, 2004 @12:35PM (#10711038) Journal
          When you throw something in the garbage, it's still yours. It's not free for the taking.

          Not in the USA. Trash is considered 'abandonded property' [harvard.edu] and is up for grabs.

          • " Not in the USA. Trash is considered 'abandonded property' and is up for grabs.

            Very true...I live in New Orleans. I think I mentioned it before, but, you put anything out that even LOOKS relatively useful (and some amazing non-useful)...and it will not be there by morning. Hehehe...one afternoon, while getting ready to move..decided it was time to get rid of some of the old playboys and such rather than move them. I put them all in a box, but, left the lid open. This was a good 40-50lbs easily...well,

      • by ajs318 ( 655362 ) <sd_resp2@@@earthshod...co...uk> on Wednesday November 03, 2004 @12:42PM (#10711182)
        I've always thought that it should be the recipient of a used storage device, howsoever acquired, who should be bound to secrecy in respect of its contents. If their intentions are honest, and all they want to do is store stuff on it, fine. If they want a little peek, well, that's pushing it. But the minute they base a decision on something they discovered there, or communicate it to a third party, they've definitely crossed a line.

        Also, if you don't do a bad block scan {which wipes out any pre-existing data good and proper} on a used hard drive when you create the file system{s} on it, you're just asking for trouble.

        I recommend dd if=/dev/audio of=/dev/hda1 {or whatever; but basically you want to get the raw data coming in from the sound card and write it straight to the disk partition} before passing on a used drive. Crank up the input gains to the max, but don't actually plug anything in ..... let the static and power hum do their job, which is to create entropy. After one overwrite cycle, there is no way the drive can recover the data by itself; specialised techniques are required whose cost is prohibitive and whose reliability is questionable. After two overwrite cycles {with high-enough entropy data}, even they don't work. Anything more than two overwrites is a waste of effort, and resources; there is always an easier way to reconstruct data when just one copy of it has been overwritten magnetically.
        • Or, better:

          for i in $(seq 4) ; do
          dd if=/dev/urandom of=/dev/hda
          dd if=/dev/zero of=/dev/hda
          done

          Writes over the disk with random data, then zeroes, a total of four times. Good luck recovering anything off that puppy (although, it most likely can still be done with some *very* sophisticated equipment).

  • openbsd rm (Score:5, Informative)

    by Anonymous Coward on Wednesday November 03, 2004 @08:11AM (#10709095)
    openbsd has rm -P which will overwrite the bytes of the 3 times
    • Re:openbsd rm (Score:5, Informative)

      by Ice_Balrog ( 612682 ) <ice_balrog@NOSpAM.netzero.net> on Wednesday November 03, 2004 @08:36AM (#10709221)
      Linux and other *NIXes also have shred, which can do that and a bunch of other things.

      For instance, 'shred -u -z file' will overwrite that file 25 times with random bits, overwrite it with all zeros to hide the shreading, then remove the file.

      'info shred' (or 'man shred' for less detail) for more info on how to use shred.
      • Re:openbsd rm (Score:5, Informative)

        by dukerobillard ( 582741 ) on Wednesday November 03, 2004 @09:18AM (#10709457)
        I'd never heard of shred, so I checked it out, and found this interesting tidbit in the man page:

        CAUTION: Note that shred relies on a very important assumption: that the filesystem overwrites data in place. This is the traditional way to do things, but many modern filesystem designs do not satisfy this assumption. The following are examples of filesystems on which shred is not effective:

        * log-structured or journaled filesystems, such as those supplied with AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)

        * filesystems that write redundant data and carry on even if some writes fail, such as RAID-based filesystems

        * filesystems that make snapshots, such as Network Appliance's NFS server

        * filesystems that cache in temporary locations, such as NFS version 3 clients

        * compressed filesystems

        • Re:openbsd rm (Score:3, Interesting)

          by tuffy ( 10202 )

          I'd never heard of shred, so I checked it out, and found this interesting tidbit in the man page:

          CAUTION: Note that shred relies on a very important assumption: that the filesystem overwrites data in place. This is the traditional way to do things, but many modern filesystem designs do not satisfy this assumption.

          This is quite true, which is why shred is generally more effective when used on an entire device (/dev/hdb, /dev/fd0, etc.) rather than on a single file on a filesystem. Even then, however,

      • by qray ( 805206 ) on Wednesday November 03, 2004 @09:34AM (#10709561)
        overwrite it with all zeros to hide the shreading, then remove the file Wouldn't it be better to replace it with the original bits. That would remove all traces of shredding. Something pithy goes here
    • Re:openbsd rm (Score:3, Interesting)

      by ajs ( 35943 )
      #!/bin/sh
      # file wiper
      #
      # I recommend against ever using this. It is often
      # the case that you DON'T want to make sure that
      # no effort used to recover a file can work.

      for file in $* ; do
      size=$(stat -c '%s' $file)
      for i in 1 2 3 ; do
      head -c $size /dev/urandom > $file
      done
      rm $file
      done
  • Well, without the verbose/interactive flag, it's quite more dangerous the 'rm' approach, still the word 'format' itself it is, subjectively, less musical than 'remove'.
    • by Rosyna ( 80334 ) on Wednesday November 03, 2004 @08:40AM (#10709244) Homepage
      Whatever the issue is it does prove one thing... Windows' System File Restore doesn't actually work too well. I mean you can easily delete NTLDR.dll and XP won't replace it. And this test shows that windows won't replace dlls if you start deleting things en masse. I know it sounds like common knowledge but some people honestly believe that system restore on Windows is the greatest thing ever and cannot be defeated. Go figure.
  • by cyborch ( 524661 ) on Wednesday November 03, 2004 @08:13AM (#10709103) Homepage Journal
    would be 'mkfs /dev/hda1' vs 'format c:'
  • Slashdotted, mirror: (Score:3, Informative)

    by Anonymous Coward on Wednesday November 03, 2004 @08:13AM (#10709105)
  • by pigeon ( 909 ) on Wednesday November 03, 2004 @08:13AM (#10709106) Homepage
    they apparently did a rm -rf / on their webserver..
    • text (Score:5, Informative)

      by Anonymous Coward on Wednesday November 03, 2004 @08:17AM (#10709140)
      format c:

      There's a nerdy idea floating around that you can tell an uninformed Windows user to type "format c:" in the Run dialog to solve their problems. This is perpetuated in office jokes and comics among other places, but how many people have actually tried to destroy their using "format c:".

      I made a goal for myself to find out what would happen if I ran "format c:" on a freshly installed Windows system and decided to compare it to the equally notorious "rm -Rf /" in Linux. Besides noting how effectively I could trash the system, I wanted to see how the operating system responded, and what it took to be able to destroy the system. I know that "format c:" and "rm -Rf /" aren't equivalent, but they usually are interchangeable punchlines to jokes, which is why they were chosen.

      Read more for the destruction of two perfectly good operating system installations.

      My target OSes were Windows XP Pro and Ubuntu Linux, both with all the latest and greatest updates. The installs were both fresh and no additional security settings had been set. Ubuntu asked me for a password during installation, Windows did not, which we will see makes a difference later down the line.

      First I established a baseline for my environment: a virtual shell parked at the root of the file system (C:\ for Windows, / for Linux).
      Windows Linux

      Larger Image Larger Image

      Well, that was simple enough. Getting to each file system's root was a nearly identical process. Now is where things will change, however. In Windows, I am going to attempt to format the drive, a low level operation which usually occurs on drives not being used and in Linux I am going to attempt to remove all of the files from the filesystem. Both should give me an empty file tree when I'm done, but come at it from different angles. In Windows, I use the "format c: /FS:NTFS" command, in Linux "rm -Rf *".
      Windows Linux

      Larger Image Larger Image

      Thankfully, and as I expected, neither of these commands wiped out my filesystem. To my shock, Windows looked as if it was going to comply with my wishes. It asked me if I would like to proceed and I confirmed that indeed I would. Ah, but as I expected, the drive was mounted and could not be formatted until it was unmounted; so I told it to try to forcefully unmount the drive. Finally it told me that it could not gain sole access to the drive and would not continue. So, straight away "format c:" will not erase your hard drive! Now how did Linux fare? Also, as I expected, almost nothing was deleted by my "rm -Rf *". My personal home directory (~/jonathanhohle) might have been erased, I didn't think to check it before I moved on. All in all, however, both systems were still up, stable, and in need of more abuse!
      Windows Linux

      Larger Image Larger Image

      Larger Image

      Larger Image

      My goal was to mass erase these disks from the command line and so far I hadn't had much luck. With Windows I knew I was going to have to take a different approach, with Linux, I knew exactly what I had to do to kill this system.

      I decided to attack Windows from the same attack point as I was hitting Linux. Instead of trying to do a low level erasure of my files I was just going to recursively delete them. So after a little mucking around at the command prompt, I came up with "del /F /S /Q *". Linux was a no brainer. All I had to do was escalate my permissions with sudo, "sudo rm -Rf *" to be exact.
      Windows Linux

      Larger Image Larger Image

      Well, that did the trick on both systems with one caveat. As the first Linux screenshot under this paragraph shows, Linux would not continue with the command until the root password was entered. Windows, on the other hand had no problems going to town unlinking files after the [Enter] key was struck.
      Windows Linux

      Larger Image Larger Image

      Afte
  • you know (Score:5, Funny)

    by iamnotacrook ( 816556 ) on Wednesday November 03, 2004 @08:14AM (#10709115)
    i read that whole article, and i couldnt find the hilarity.

    i'll go back to laughing at the election results. or was it crying, i cant remember now.

  • sudo password (Score:5, Insightful)

    by emmavl ( 202243 ) on Wednesday November 03, 2004 @08:16AM (#10709123)
    In the article he mentions sudo asks the root password, while it's actually asking the password of the user performing the sudo ! So I guess he must have set the root password identical to his user password during the installation.
    • Re:sudo password (Score:5, Informative)

      by _Hellfire_ ( 170113 ) on Wednesday November 03, 2004 @08:20AM (#10709157)
      I run Ubuntu Linux myself. Setting the "root" password to the first user's password is default behavior. Technically, there is no root in a default Ubuntu install, you must create it/turn it on.

      I believe that Solaris no longer has a root user either (for security), and that you must sudo everything. Someone feel free to correct me (well this is /. I don't have to ask ;)
      • Re:sudo password (Score:5, Informative)

        by nrosier ( 99582 ) on Wednesday November 03, 2004 @09:05AM (#10709386)
        Solaris still has root but since Solaris 8 or 9 they have RBAC, which is a bit like sudo. Role-Based-Access-Control. You assume a roll which gives you extra priviliges.

        In Trusted Solaris they also have root but since this is a high grade security OS, root is not god. You have labels (top-secret, restricted etc... iirc). So you might have root-access on a low level label and not being able to do anything.
        • Re:sudo password (Score:4, Interesting)

          by surprise_audit ( 575743 ) on Wednesday November 03, 2004 @11:45AM (#10710581)
          Sounds like they're finally catching on to Multics-type security from back in the 80s, where you could own a file, have read/write access, and still not be able to touch it if it was created in a different privilege level...
    • Re: (Score:3, Informative)

      Comment removed based on user account deletion
  • http://66.102.7.104/search?hl=en&lr=&q=cache%3Ahtt p%3A%2F%2Fhohle.net%2Fscrap_post.php%3Fpost%3D23%2 6m%3Dfull&btnG=Search
  • Yes I rta (Score:2, Interesting)

    by n54 ( 807502 )
    Talk about trying to kill a simple joke, for all the braindead: it's the intention of the commands that is funny, not typing the command (well that too if it would work but only del *.* in real dos works and that was pretty much the original joke I guess).

    To remove this comment press F4 on windows...

    And FP btw
    • Re:Yes I rta (Score:2, Interesting)

      by wdd1040 ( 640641 )
      del *.* isn't the proper command. deltree /y *.* is. del *.* wouldn't delete the directories recursively it's be like rm -f /.
  • by jellomizer ( 103300 ) * on Wednesday November 03, 2004 @08:17AM (#10709130)
    rm -Rf / removes all the files mounted on the file system. format c:\ rewrites a new file allocation table.

    The issue of Linux not running as cleanly after all the files are whiped out vs. Windows still able to run isn't much a means of stability. Remember in Linux/Unix systems, Everything is a file. While in windows it is some hodgepodge framework where some are files and other are not. So naturally if you wipe out all the files on a Linux/Unix system problem will happen. While windows which puts a lot of its features in memory and stayes there so it can still operate even after you logout. In some ways having X windows crash after you try to leave is a good thing because you know that something is wrong sooner. vs. Windows just acting like nothing happend.
    • by Mordaximus ( 566304 ) on Wednesday November 03, 2004 @08:24AM (#10709172)
      Author acknowledges this too, a quick RTFA shows : "I decided to attack Windows from the same attack point as I was hitting Linux. Instead of trying to do a low level erasure of my files I was just going to recursively delete them. So after a little mucking around at the command prompt, I came up with "del /F /S /Q *"."
    • by a_hofmann ( 253827 ) on Wednesday November 03, 2004 @08:52AM (#10709313) Homepage
      Actually the situation is different than you describe it, as "everything is a file" would generally also hold true for Windows from the file system perspective. Both Linux and Windows load data from a file to memory and keep it there while being in use. Swapping may apply but you can think of the file being wholly in memory.

      The difference lies in the ownership design, wherein Windows locks a file when it is opened and leaves it at that until closed. Linux, on the other hand, works with the current snapshot of the file.

      File locking is a good thing in the demonstrated situation, as graceful error recovery is important. IMO this case shows the very reason for it being implemented in Windows. Most Windows users have administrator privileges which allow them to delete files they shouldn't be able to, while Linux uses a more strictly separated user concept where regular users are not able to delete crucial system files.

      While sometimes file locking is necessary (and in the UNIX case has to be done manually), general file locking is not a good thing because it prevents live system updates. This is why you can update your whole Linux system (besides the running kernel) without rebooting, a thing impossible for Windows installations.
      • Just a little clarification for the sake of readers who don't know anything about unix file unlinking.

        If you use unix/linux, try this experiment:

        Create a file foo.txt. Open it with an editor.

        Now, from a separate shell, rm the file.

        The editor can still save changes. As soon as the editor exits, the file will be completely deleted. I'm not sure about current versions of linux, but in the past at least you could do an ls -a of the directory containing the file and see a hidden file with a random name wh
  • by skroz ( 7870 ) on Wednesday November 03, 2004 @08:17AM (#10709137) Homepage
    I once saw an errant script run as a cron job (I DIDN'T WRITE IT, DAMN IT! WHY DON'T PEOPLE BELIEVE ME!!!) execute "rm -f *" in root AS root once. No big deal, right? What if someone accidentally (IT WASN'T ME!!!) created a file called "-r" in / two years prior to the errant rm? Hmm? Now what happens if you have nearly two terabytes of data mounted rw without root squashing via NFS on that workstation? Now what happens if that runs on a Saturday night and nobody notices until Monday morning?

    I'll tell you what happens. What happens is that the next several days are very, very, very long and very, very, very uncomfortable.
    • by Anonymous Coward
      I once saw an errant script run as a cron job (I DIDN'T WRITE IT, DAMN IT! WHY DON'T PEOPLE BELIEVE ME!!!) execute "rm -f *" in root AS root once.

      I once saw a script that had "rm -rf $(FOODIR)/*".

      No problem in that. Except that one adminstrator run it as a root and nobody had thought to define $FOODIR for root...
    • by ajs ( 35943 ) <ajs.ajs@com> on Wednesday November 03, 2004 @08:45AM (#10709271) Homepage Journal
      Along similar lines, a co-worker at one of my recent jobs had installed a machine for one of our remote users. He mounted the file-server's storage array directly in order to create the user's home directory. Unfortunately he did 3 things wrong:

      1. He left the root of the storage array mounted
      2. He left it mounted under /tmp
      3. He left the tmp-cleaning cron job enabled

      When we started to see user file go away (but directories left intact) we thought we were under some kind of attack... we were right in a way ;-)
    • by cortana ( 588495 ) <sam@robots[ ]g.uk ['.or' in gap]> on Wednesday November 03, 2004 @10:24AM (#10709899) Homepage
      Save Shell Programming, Lesson 1!

      Use the -- argument to indicate that all following parameters are filenames, and are not to be parsed as options:

      rm -f -- *
    • by achurch ( 201270 ) on Wednesday November 03, 2004 @10:43AM (#10710005) Homepage

      Along the same lines, I had at one point a link "~achurch" in my public_html directory, for compatibility after my homepage changed URLs. So (you can guess what comes next, I'm sure) I decided one day, several years later, to clean up my web stuff:

      $ rm -r tmp/ x.html [...] ~achurch/
      rm: override permissions 000 for /home/achurch/.xcdroast? _

      I have no idea why mny .xcdroast was 000, but it saved me a huge amount of frustration. I now place a file "..norm-r", mode 000, in important directories and rename things around to make sure it's always first in the directory file. And I never, ever use -f.

  • The site is gone, but I read the text from Googles cache. [google.dk]
    I don't find it interesting though. What's next, comparing PS2 to Xbox by hammering them with a brick and see how much damage is made?
  • slow? (Score:3, Interesting)

    by miyako ( 632510 ) <miyako AT gmail DOT com> on Wednesday November 03, 2004 @08:20AM (#10709153) Homepage Journal
    I thought it was pretty interesting that it took so much longer to delete everything under windows/NTFS. Anyone know why this is (is NTFS slow, or is it the del command as the author guessed, or is there some other reason for this).
    • Re:slow? (Score:4, Informative)

      by Pedersen ( 46721 ) on Wednesday November 03, 2004 @09:52AM (#10709678) Homepage

      Anyone know why this is (is NTFS slow, or is it the del command as the author guessed, or is there some other reason for this).


      Actually, a big chunk of this is screen I/O. The fix? Instead of using del (which likes to print out the names of all files it deletes), use rmdir /s /q. It goes much much faster (and yes, this is speaking from experience, though good experience, for a change).

  • Get a life (Score:5, Insightful)

    by soul_hk ( 607396 ) on Wednesday November 03, 2004 @08:20AM (#10709155)
    Seriously folks,
    this proves almost nothing.
    This guy really needs to find something better to occupy his time with, ideas include polishing the spoons, re-arranging the sock drawer and cleaning the fridge.

    We all know the best way to screw a Windows XP SP2 user is to convince them to turn off the firewall ..

    mod me down, see if I care
    • We all know the best way to screw a Windows XP SP2 user is to convince them to turn off the firewall .

      Some might argue that simply having Windows XP means the users have already screwed themselves.

  • Shred (Score:5, Informative)

    by Ann Coulter ( 614889 ) on Wednesday November 03, 2004 @08:24AM (#10709167)
    I like to use "shred /dev/hda". That takes time but it is worth it if you know you will never use that hard drive again, such as when you leave a company. If you are in a pinch, you can first do a "cat /dev/zero > /dev/hda". You can also use "dd" or "sdd". If you want to erase a magnetic medium, zero out the media first and then use "shred".
  • Try this for almost the same effect but a very small fraction of the time:

    # rm -rf /etc

    I have did this (twice) by trying to delete something in /etc, but pressed return too quickly. By the time I pressed CTRL-C, every file in /etc is already blanked out!
  • rm -Rf / (Score:5, Funny)

    by Savage-Rabbit ( 308260 ) on Wednesday November 03, 2004 @08:29AM (#10709192)
    I once watched somebody do that while logged in as root on a unix machine. The guy was a really fast typist with an ushakable faith in his ability, before I had a chance to stop him he had managed to type and commit the command:
    root@localhost# rm -rf / somedir/somesubdir
    instead of:
    root@localhost# rm -rf /somedir/somesubdir
    That inadvertent space made all the difference. Fortunately we had a very good backup system.
    • user@localhost:~ $ rm /mnt/floppy/ *

      I wanted to kill myself after that one.
    • Re:rm -Rf / (Score:3, Funny)

      by Sentry21 ( 8183 )
      Seen in a makefile in comp sci class:
      clean:
      rm -rf *.o *~ /* Remove all temp files */
      Fortunately, the kids weren't running as root. They DID have to re-do their project afterwards though. Handy tip, don't use -r unless you REALLY need to. Accidents make it disastrous.

      --Dan
  • by Anonymous Coward on Wednesday November 03, 2004 @08:32AM (#10709207)
    was the message I got after trying to logout of a similarly trashed Debian Woody system.
  • by colores ( 766507 ) on Wednesday November 03, 2004 @08:38AM (#10709235)
    From: [sun.com] "Solaris 10 has (since build 36) a version of /usr/bin/rm (/bin is a sym-link to /usr/bin on Solaris) and /usr/xpg4/bin/rm which behaves thus: [28] /bin/rm -rf / rm of / is not allowed [29]"
  • by ccarr.com ( 262540 ) <chris_carr@[ ]sh ... m ['sla' in gap]> on Wednesday November 03, 2004 @08:51AM (#10709310) Homepage
    ...use the shell's built in file expansion:

    echo *
    • by dbIII ( 701233 )
      If vi still lives you can also use that as ls (used it that way on dodgy disk mirror that corrupted both disks).
    • by bryhhh ( 317224 )
      Interesting, damn it - where are my mod points when I need them.

      I could have done with tip that a few weeks ago. The UK TiVo has a serial port on the back which allows you to get a bash shell, unfortunately there is no 'ls' on the damn thing, so I ended up using 'file ' to get a directory listing.

      Just for info, echo */ will list only the directories.
  • dissecting frogs.. (Score:4, Insightful)

    by mks113 ( 208282 ) <{mks} {at} {kijabe.org}> on Wednesday November 03, 2004 @08:51AM (#10709311) Homepage Journal
    Humor can be dissected as a frog can, but the thing dies in the process and the innards are discouraging to any but the pure scientific mind.
    E. B. White (1899 - 1985)
  • Unix file philosophy (Score:5, Informative)

    by BlueWonder ( 130989 ) on Wednesday November 03, 2004 @08:58AM (#10709343)

    It seems that the author misunderstands an important part of the Unix philosophy:

    Linux, however, loads programs into memory and doesn't worry about locking them, so nearly everything was removed, even programs that were currently running when I removed them.

    That's far from true. Linux locks the executable file, i.e. if you attempt to open it for writing, you get an error. You can, however, remove the directory entry, in which case the file is retained as long as the program is still running.

    Under Linux, a file can have zero, one, or more directory entries (a.k.a. hard links). It's not possible to remove files, only directory entries can be removed. The kernel removes the file automatically once two conditions are fulfilled:

    1. No directory entries point to the file.
    2. No processes have the file opened.

    In fact, under Linux the /proc filesystem allows it to get the contents of an open file back even if it has no directory entries outside of /proc.

  • by argent ( 18001 ) <peter@slashdot . ... t a r o nga.com> on Wednesday November 03, 2004 @09:14AM (#10709434) Homepage Journal
    Back in the '80s, my boss had one of the first PCs in the building with a hard disk. One day he asked me to copy some files off onto a floppy, so I put the floppy in the drive and typed "format", as I was used to doing...


    C:>FORMAT
    Insert floppy into drive C: and hit return.


    The rest is history. As was everything on the drive.
  • by LINM ( 255706 ) <mbego00.gsb@columbia@edu> on Wednesday November 03, 2004 @09:18AM (#10709464) Homepage
    I tried some similar expressions recently:

    format c: /FS:KERRY
    rm -Bush *

    The results were very telling. Both candidates made about 5,000 prompts all on the order of "5 more years?:" and "The American people will pick the right man for 5 more years?:". As most of these prompts were gibberish, I responded in a random fashion.

    In the end, the files of the Bush system remained on the system, but still functioned poorly and continued to periodically core dump.

    What amazed me on the Kerry system was that the files actually wrote over themselves many times before all simultaneously deleting!

    All in all, the process took about 7 months and I can honestly say that I hope never to have to do that again. Further more, based on how both operate when active, I would like to see a completely new category of OS if I do have to go through this again.
  • ls (Score:3, Insightful)

    by szo ( 7842 ) on Wednesday November 03, 2004 @09:21AM (#10709478)
    He notes that "dir" is a built-in and "ls" is an external, so he could get a directory in windoz, but not on linux. Thats wrong, he could have used "echo *" on linux to get the directory listing.

    Szo
  • by jahalme ( 563074 ) on Wednesday November 03, 2004 @09:23AM (#10709493) Homepage
    Typing the tilde character on a finnish keyboard is just plain stupid. You have to first hold AltGr and press a key to the left to enter, underneath backspace, then release both keys and press space. Insanity!

    Ok, I've just finished installing Linux on a fresh hard drive and have spent a few hours editing stuff in /etc using my favourite editor joe. The editor creates backup files everytime it overwrites a file, naming them as the original filename with a tilde appended. I wanted to quickly remove all the backup files so I typed

    rm -f *~
    But curses, my caffeine-overloaded fingers were too quick to hit that spacebar and I ended up with
    rm -f * ~
    AARGH! There goes BOTH /etc AND root's home directory. Damn you whoever came up with the finnish keyboard layout!
  • by catdevnull ( 531283 ) on Wednesday November 03, 2004 @10:07AM (#10709790)

    These methods are pretty good ways to kill a system. However, I found that a large electromagnetic field generated by an old bulk eraser produces similar results in just seconds! Man, was my cube mate pissed!

    I don't have screenshots, though. I think I'm sterile, too.

  • by ltwally ( 313043 ) on Wednesday November 03, 2004 @10:12AM (#10709826) Homepage Journal
    In his conclusion Jonathan claims that EXT3 is faster than NTFS ...
    "NTFS is much slower then EXT3"


    I believe he is wrong. Firstly, everyone knows how dogg slow EXT3 is at just about everything. ;) ... But more importantly I notice that he seems to be doing all the work from a windowed command prompt. Normally you wouldn't see that as a problem... however, I have noticed on several occasions that when text is rapidly scrolling accross the screen, the command prompt hogs the CPU -- to the point of dragging out whatever operation you're doing to several times the necessary length of time.

    There is an easy fix for this -- just don't have massive amounts of text scrolling through a windowed command prompt; minimize the window, pipe the text to a file, or even make the command prompt full screen. Any of the above tricks will dramatically speed things up, as the CPU is no longer spending large amounts of its time writing text to the screen.

    If anyone out there is feeling adventurous (or insane), go ahead and try to replicate Jonathan's test -- only don't leave the command prompt in windowed mode. Minimize it or redirect the text. I'd bet you my ex-girlfriend's right arm that NTFS is suddenly as fast as, if not faster than, EXT3.
  • A Fun Game! (Score:3, Funny)

    by Robmonster ( 158873 ) <slashdot.journal2.store@neverbox.com> on Wednesday November 03, 2004 @10:27AM (#10709919) Journal
    We used to login as root and type 'rm -r' into the console WITHOUT pressing Enter.

    We then took turns at throwing stuff at the keyboard to see if we would just-so-happen to hit the Enter key.

    Luckily, none of us were very good shots...

    RM
  • by crath ( 80215 ) on Wednesday November 03, 2004 @10:35AM (#10709962) Homepage
    The problem with the tester's premise is that he is from the wrong era. These punch lines originate from 20 years ago. In those ancient days of computing, the commands did indeed allow a user to effectively (in the case of UNIX) or completely (in the case of MS-DOS) wipe out their file system.

    I speak from personal experience on both OSes; 20 years ago, when both OSes were still young.

    A fair test of these punch lines can only be executed on MS-DOS 1.x and on one of the *many* UNIX varients from the mid-1980s.
  • by infonography ( 566403 ) on Wednesday November 03, 2004 @11:10AM (#10710221) Homepage
    simmer your drive for 40 minutes on high heat till tender. Add taters, carrots, celery. spices. Remember to Floss now.
  • by Denis Lemire ( 27713 ) on Wednesday November 03, 2004 @12:12PM (#10710827) Homepage
    I once did a recursive rm -rf / as root on Slackware linux. After it completed I tried to log out and all I got was a message that said:

    "You don't exist, go away!"

    Very amusing.

    Anybody know which Linux package is responsable for this message?

Our OS who art in CPU, UNIX be thy name. Thy programs run, thy syscalls done, In kernel as it is in user!

Working...