Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror

Comment The '/dev/null' idiom (Score 5, Informative) 342

I actually did this once. Our school's CS cluster was maintained partly by students, one of whom was me. I was, of course, very inexperienced in actual Unix administration, though I had read Slashdot, Usenet, etc., quite a bit. There was a directory in someone's home directory that no one could delete, even as root (probably due to some bizarre NFS issue, never figured it out). I had heard the phrase "send flames to /dev/null" and others in that vein. Plus I knew... er, "knew"... that /dev/null would always delete what you sent to it. Putting 1 and 1 together to make 3, I typed sudo mv undeletable_dir /dev/null.

In the terminal room, there was suddenly a cacophany of beeping. The phone started ringing. This was bad. And no one knew how to fix it.

Someone suggested rebooting the machine. Of course, the machine promptly refused to boot. Much panic was in abundance, the phrase "complete restore from backup" was ominously spoken. Finally, someone with a Clue (TM) showed up and pointed out that we only needed to remake the symlink from /dev/null to the actual device in /devices/pseudo/ (this is a Solaris system). Crisis averted.

Moral? Several. man(4) null. Don't do things as root if you aren't sure what will happen. When you fsck shit up, try to find someone who actually knows what they're doing, and get them to fix it. And, above all, don't believe what you read on the Internet.

Slashdot Top Deals

You can not win the game, and you are not allowed to stop playing. -- The Third Law Of Thermodynamics

Working...