Slashdot Mirror


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

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."

61 of 513 comments (clear)

  1. ...vs Magnet vs Tossage by molywi · · Score: 4, Funny

    I prefer the magnet or throwing the disk out the window.

    1. Re:...vs Magnet vs Tossage by 1nhuman · · Score: 5, Interesting

      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.

      --
      The glass is half-full. With poison. And there are cracks in the glass. The dirty, dirty glass.
    2. Re:...vs Magnet vs Tossage by Firethorn · · Score: 4, Interesting

      physical destruction is the only authorized destruction method for many classified drives.

      On my base, we sometimes took the drives over to EOD (Explosive Ordinance Disposal). They reportably had a great time.

      --
      I don't read AC A human right
    3. Re:...vs Magnet vs Tossage by Bertie · · Score: 3, Insightful

      Why? This guy's in a responsible position, he should be more careful. The buck stops with him.

    4. Re:...vs Magnet vs Tossage by LaCosaNostradamus · · Score: 3, Interesting

      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?

      --
      [You have a stable society when some nut guns down a schoolyard and the law doesn't change.]
    5. Re:...vs Magnet vs Tossage by umpa · · Score: 3, Insightful
      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.

    6. Re:...vs Magnet vs Tossage by Le+Marteau · · Score: 4, Informative

      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' and is up for grabs.

      --
      Mod down people who tell people how to mod in their sigs
    7. Re:...vs Magnet vs Tossage by ajs318 · · Score: 3, Interesting

      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.

      --
      Je fume. Tu fumes. Nous fûmes!
    8. Re:...vs Magnet vs Tossage by hazem · · Score: 3, Informative

      You were lucky. I worked in a Top Secret facility and we were required to disassemble the drives, and remove each platter. Then using a belt sander, we had to scrub them down to bare metal. These metal pieces were then taken to an incinerator that would mostly melt what was left.

      The cool part was being able to recycle the magnesium casings on those giant-sized drives (about a foot wide, 8 inches tall, and about 2 feet long). I made a few hundred dollars on that!

      I don't know what the big deal was, though. Our facility only handled... oh wait, someone's at the door...

    9. Re:...vs Magnet vs Tossage by evilviper · · Score: 3, Informative
      we were required to disassemble the drives, and remove each platter. Then using a belt sander, we had to scrub them down to bare metal.

      Platters aren't metal.
      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    10. Re:...vs Magnet vs Tossage by hazem · · Score: 3, Informative

      These were, or they appeared to be.

      In any case, the magnetic material was a certain color - kind of a golden brown, and the substance below was something else. We had to sand off any of the golden brown stuff so that only the underlying substance remained.

      I think most platters today are made out of glass, but many years ago, they were made out of something that was very metal-like. This is back when the platters were more than a foot across. Physically, they were very large drives.

    11. Re:...vs Magnet vs Tossage by the+narf · · Score: 3, Informative
      They shattered because modern disk platters are made of glass. Why? Because a glass surface can be made to higher tolerances than aluminum (the material of choice in older drives) or other non-ferrous metals that have been used for platter substrates. Glass is also more dimensionally stable in changing temperatures than aluminum as well.

      The older drives used 14" platters. I can still remember the Digital RP06 drives, which were OEMed from Memorex. The drives looked like black washing machines. (Wiggled around like they were on "spin dry" too when lots of seeking was going on.)

      The point here, though, is that trying to cut a modern disk platter is likely to result in shards of glass all over the place...

  2. openbsd rm by Anonymous Coward · · Score: 5, Informative

    openbsd has rm -P which will overwrite the bytes of the 3 times

    1. Re:openbsd rm by Ice_Balrog · · Score: 5, Informative

      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.

      --
      #include "sig.h"
    2. Re:openbsd rm by dukerobillard · · Score: 5, Informative
      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

    3. Re:openbsd rm by qray · · Score: 4, Funny

      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

    4. Re:openbsd rm by mcmonkey · · Score: 3, Insightful
      Bruce Schneier mentioned that magnetic media can be read using magnetic dust and a microscope...irrespective of the number of overwrites

      I'm very skeptical of this claim. He's essentially claiming any magnetic media has an infinite capacity.

      For example, take a disk with a capacity of 100 GB. I fill that with data; I read the data.

      Then I overwrite the entire disk with another 100 GB of data. Of course I can read the new data. And supposedly with enough time and patience I can read the data that has been overwritten. By overwriting I've doubled the capacity of the media.

      When I overwrite the disk again I can read the new data, I can recover the data I've just overwritten, and because this process is irrespective of the number of overwrites, I can retrieve the original data that has been overwritten twice.

      This seems to defy some basic laws of physics, but I admit I do not know all the inner workings of magnetic media.

    5. Re:openbsd rm by greed · · Score: 5, Informative
      I'm not intending to support the claim that the number of overwrites is infinite, or even large.

      But I believe the basis of the claim is that, for any given "bit position" on the disc, the current magnetic reluctance of that position depends on its current state and some function of the previous state. And the previous state depends on itself and ITS previous state, and so on.

      Also, the aligment of each recording cell does not precisely line up each time. There's very sophisticated circuitry in a modern drive to figure out what the bit was supposed to be. (Keep in mind that what is actually written to the disk is coded, so that you never get long runs of 0s or 1s.) All those probabilities are fed in to the decode logic to come up with actual, usable bytes.

      So if you get to the magnetic surface and can assess the relative strengths of fragments of bits at each bit position, you can start to rebuild the history of that position. Then you have to re-run the decode to work out what the datablock contained.

      Though I can only see this being feasible for a small number of overwrites... but I really must read some of Schneier's works.

      There's a reason why we make backups; data recovery in that manner costs a fortune.

    6. Re:openbsd rm by zarthrag · · Score: 3, Informative

      What he is implying, I think, is that the data isn't *completely* overridden. With specialized equipment (as that is likely an electron microscope) it is possible to uncover the overwritten data. That data will by no means be complete enough to pass a CRC check - but with time & effort, it's remotely possible to find something interestingly old.

      --
      Why can't all fpga/microcontroller manufacturers just release free optimizing compilers???
    7. Re:openbsd rm by alangmead · · Score: 3, Informative

      I'll accept your criticism about screwing up the return value of read, but I disagree about partial reads. Perl's read is equivalent to C's fread() which will retry from partial reads.

      Although the shell version is working in blocks, it will not leave bytes unreplaced at the end. It might perhaps increase the logical size of the file before removes it. (du will report the number of blocks in use, and round a partial block to the next block. The file system will always allocate space in some multiple of a block size, so extending it to the end of the block won't actually increase the disk space allocated to the file.)

      And since I'm enumerating what I agree and disagree with, I guess I should add that I agree with the utility of File::Copy. Thank you for it.

  3. A more appropriate shootout by cyborch · · Score: 5, Insightful

    would be 'mkfs /dev/hda1' vs 'format c:'

    1. Re:A more appropriate shootout by Mjlner · · Score: 3, Funny
      If you would've bothered to RTFM:
      "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."

      This comparison is mostly to check how well you can get a n00b to screw up his system, which is notoriously done with format and rm.

      --
      Lemon curry???
    2. Re:A more appropriate shootout by geoffspear · · Score: 4, Funny

      If you want someone to screw up his system, then "while (1)
      mkdir foo; cd foo
      end"
      is even more effective.

      --
      Don't blame me; I'm never given mod points.
  4. Slashdotted, mirror: by Anonymous Coward · · Score: 3, Informative
  5. Before they got slashdotted.. by pigeon · · Score: 4, Funny

    they apparently did a rm -rf / on their webserver..

  6. you know by iamnotacrook · · Score: 5, Funny
    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.

  7. sudo password by emmavl · · Score: 5, Insightful

    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.

    1. Re:sudo password by _Hellfire_ · · Score: 4, Informative

      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 ;)

      --
      "And then I visited Wikipedia ...and the next 8 hours are a blur..."
    2. Re:sudo password by nrosier · · Score: 5, Informative

      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.

    3. Re:sudo password by djdavetrouble · · Score: 4, Funny

      Well I can't find any evidence that it does or does not void your warranty, on apple's own site or google, not even a mention of it. Also, I can't believe that enable root would prevent you from getting hardware replaced. It is a normal system function, and there are no warnings to that effect when you do enable the root user (WARNING ENABLING THE ROOT USER WILL VOID YOUR WARRANTY, that sort of thing). It just sounds preposterous, imagine:
      You: My hard drive is fritzed, the s.m.a.r.t. diagnostics indicate a hardware failure.
      Apple: Is root user enabled?
      You: Yes, I am an old skool unix geek that has to have a terminal with '#' open at all times when I am at my system, along with my case of mountain dew and tub of beef jerky.
      Apple: Sorry then, enabling root user voids your hardware warranty.
      You: But I have to test out this rm -Rf / thingy
      Apple: Not on our dime, you root abuser. Use sudo instead after you have purchased a new hard drive.

      My guess is this is a lie that someone perpetuated to get some n00b to keep from (unwisely) enabling r00t.

      --
      music lover since 1969
    4. Re:sudo password by djdavetrouble · · Score: 3, Funny

      Depends on char race and class. You should chose a human valkyrie for your role based access account, if you want high strength. If you come across Mjollinir, you can throw it and it comes back to you (with 25 strength or higher), plus lightning damage.

      Earlier in the game, Magicbane will serve you better (magic resistance, engraving, and curse resistance).

      --
      music lover since 1969
    5. Re:sudo password by surprise_audit · · Score: 3, Interesting

      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...

  8. rm -Rf / and format c: are not the same. by jellomizer · · Score: 4, Informative

    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.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    1. Re:rm -Rf / and format c: are not the same. by Mordaximus · · Score: 4, Informative

      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 *"."

    2. Re:rm -Rf / and format c: are not the same. by a_hofmann · · Score: 4, Informative

      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.

  9. Try it with NFS... by skroz · · Score: 4, Funny

    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.

    --
    -- Minds are like parachutes... they work best when open.
    1. Re:Try it with NFS... by ajs · · Score: 4, Interesting

      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 ;-)

    2. Re:Try it with NFS... by cortana · · Score: 4, Informative

      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 -- *

  10. text by Anonymous Coward · · Score: 5, Informative

    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

  11. Get a life by soul_hk · · Score: 5, Insightful

    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

  12. Comment removed by account_deleted · · Score: 3, Informative

    Comment removed based on user account deletion

  13. Shred by Ann+Coulter · · Score: 4, Informative

    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".

  14. Re:deltree by another_henry · · Score: 4, Informative
    They did, but you can replicate the behaviour with
    RD /S
    Also,
    DEL /S
    has a similar but not identical effect.
    --
    "Studies have shown that people who eat peanuts live longer than those who do not eat."
  15. rm -Rf / by Savage-Rabbit · · Score: 4, Funny
    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.
    --
    Only to idiots, are orders laws.
    -- Henning von Tresckow
  16. Go away, you don't exist by Anonymous Coward · · Score: 4, Interesting

    was the message I got after trying to logout of a similarly trashed Debian Woody system.

  17. rm -rf / protection in Solaris by colores · · Score: 3, Interesting

    From: "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]"

  18. Re:An interesting topic, at last!! by Rosyna · · Score: 3, Interesting

    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.

  19. The medium tech solution by Anonymous Coward · · Score: 3, Funny

    Microwave the drive... works everytime. If the room is dark, you're in for watching some serious fireworks!

  20. When ls is hosed... by ccarr.com · · Score: 4, Insightful

    ...use the shell's built in file expansion:

    echo *

    --
    I don't know half of you half as well as I should like, and I like less than half of you half as well as you deserve. BB
  21. dissecting frogs.. by mks113 · · Score: 3, Insightful

    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)

  22. Unix file philosophy by BlueWonder · · Score: 4, Informative

    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.

    1. Re:Unix file philosophy by nilsjuergens · · Score: 3, Insightful
      1) Quickly and silently removing the file, while leaving access hidden inside a link in the /proc filesystem

      The Unix Way

      2) Failing to remove the file (because you're using it right now) and informing you

      The Windows Way, also known as "please reboot for the changes to take effect"

      The OS really really should _not_ try to second-guess whats wrong or right, just let the user do it. The running application may still enforce certain rules if it has to.

      --
      -- Having problems sending big files over the net? Try out Efisto (http://efisto.org)
    2. Re:Unix file philosophy by BlueWonder · · Score: 3, Insightful
      Which is better:
      1) Quickly and silently removing the file, while leaving access hidden inside a link in the /proc filesystem
      2) Failing to remove the file (because you're using it right now) and informing you
      ?

      1) is better, and it would be better even if /proc didn't exist. There is no reason why every file must be accessible through a directory entry.

      Without this mechanism, it would be impossible to replace the directory entry corresponding to an open file atomically, which is a prerequisite for updating running executables or shared libraries.

      I reckon removing a file should be harder if it's currently being used.

      As I explained, removing a file which currently being used is not only hard, but impossible. Only the corresponding directory entries can be removed.

  23. In the good old days by argent · · Score: 3, Funny

    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.

  24. Kerry and Bush systems by LINM · · Score: 3, Funny

    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.

    --

    Hunger is the best sauce.

  25. I hate the finnish keyboard layout by jahalme · · Score: 4, Funny
    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!
  26. Re:slow? by Pedersen · · Score: 3, Informative

    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).

    --

    GPL made simple: What was my stuff is now our stuff. If you improve our stuff, please keep it our stuff.
  27. not as thorough as... by catdevnull · · Score: 3, Funny


    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.

    --

    I might know what I'm talkin' about, but then again, this is Slashdot...
  28. NTFS is much slower then EXT3 ??? by ltwally · · Score: 4, Informative
    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.
    --



    /dev/random
  29. ... or errant symlinks by achurch · · Score: 3, Interesting

    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.

  30. Interesting error messages by Denis+Lemire · · Score: 3, Funny

    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?