GNOME hangs
Chris Jones
jonesc at hep.phy.cam.ac.uk
Mon Aug 7 22:00:48 UTC 2006
> Eventually, that even didn't work and I was advised to do something
> which turned out to be disastrous so NEVER EVER issue the following from
> a root shell
>
> rm -rf $Home/*
I cannot say enough bad things about whoever suggested this to you (If they
actually did, which I really hope they didn't)
I guess the INTENTION was to delete everything from the home area of some user
account . However,
1. The first problem is if you are logged in as root $HOME (yes, all upper
case, see point 2 below) $HOME evaluates to /root. So all you end up doing is
deleting all your root account config/account files.
2. The environment variable $Home does not exist ! It is $HOME. So if you had
a clue what you where doing, and had tried
> echo rm -rf $Home/*
first you would have discovered
#[root at localhost ~]# echo rm -rf $Home/*
rm -rf /bin /boot /data /data2 /dev /etc /home /lhcb /lib /lost+found /media /misc /mnt /net /proc /root /sbin /selinux /srv /sys /tmp /usr /var /winxp
i.e. as you discovered this command eats EVERYTHING...
Let this be a lesson.
Chris
p.s. I suggest ANY rm command you run as root should include the -i flag
More information about the users
mailing list