Was fiddling around with my filesystem just now, had a new partition (stole it from windows), wrote to the partition table with cfdisk, formatted it using mke2fs, mounted it and then copied /var over (after dropping into init level 1). Then umounted /var and mounted the new partition as /var, then was wondering how to free up the space on the original partition.
Got a little careless, dropped back into runlevel 1 and did "rm -r *" in /var as root without thinking! Was half watching soccer on TV somemore! So I just wiped out the new /var I created, but luckily the original copy I wiped out was still there. So had to umount /var (which I should have done first...), then mount it as /mnt again, copy the files over, wipe out /var, then mount the new partition as /var again. But it's all good now.
This is the first time I've really quaked at the power of root, felt that sickening, awful power as I watched the computer churn, doing what I told it to do but didn't mean for it to do. Having to take responsibility for it, because I issued the command!
Oh, and a bit before that, I tried to backup the old /var by doing a cp -a /var /var.old but I typed /var/old instead! That was a crazy recursion, luckily I didn't crash the computer by filling up the root volume with infinity.
Caught my transport home today, and took 163 home. The 163 was so damn crowded. And MRT trains also get really crowded. Would I rather more buses and trains and no TV Mobile? Yes, if you're going to show some stupid show on Tuesday nights at 10pm instead of showing CSI that's on Channel 5.
Wednesday, May 04, 2005
Beware of Root
No basketball tomorrow, too bad.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment