Re: rm -rf /

Andreas Roth <[email protected]>
Newsgroups gmane.user-groups.linux.dresden
Message-ID <[email protected]>
Hoi,

>> root@debian:~# rm -rf /
>> rm: it is dangerous to operate recursively on '/'
>> rm: use --no-preserve-root to override this failsafe

Falls "rm -rf /" zu rabiat ist: Ebenfalls sehr bellebt und kann in einer Stressituation schonmal „passieren“:
find /data/.* -delete
Um dann festzustellen, dass „.." auch trifft. :)


> Genau. So macht es das rm aus den coreutils, die ueblicherweise mit
> GNU-Erweiterungen angereichert sind.
> 
>> Wie vermutet: Busybox hat keinerlei Bedenken gegen "rm -rf /" und braucht
>> keine Spezialparameter.

Interessanterweise verhält sich rm mit .* anders. Ich bin mir aber sehr(!) sicher, dass es früher mal anders war. 

rm -rf /data/.*
rm: refusing to remove '.' or '..' directory: skipping '/data/.'
rm: refusing to remove '.' or '..' directory: skipping '/data/..‘

Cheers,

Andreas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.