rm -rf $Home (was GNOME hangs)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> .... 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/*
>>>
>>
>> Are you sure you executed the command above ? This would mean you
>> deleted the /root directory and all its contents. Are you sure you
>> didn't delete your personal home dir and everything in it ?

Actually as the above command is written, it would have deleted everything under /,
not /root. $Home is not set, but $HOME.

I've seen some scripts with the following:

LOGDIR=/var/log/myapp
cd $LOGDIR
rm -rf *

If for some reason LOGDIR is inaccessible then the script owners $HOME is likely to
be trashed. On some systems where root's home is not /root, then likely everything
in / gets trashed.


>> Anyway, I guess you've learned your lesson, don't just copy and execute
>> commands (especially rm commands) from a root shell.

Which is incredibly good advice for any system...
-- 
* The Digital Hermit   http://www.digitalhermit.com
* Unix and Linux Solutions   kwan@xxxxxxxxxxxxxxxxx

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux