2
I did frequency mistake that rm -rf /*
at cygwin console on Windows 7.
After a minute I realized what I typed. So I stopped the command by Ctrl-c.
I braced myself for re-installing Windows.
But Windows works fine even after rebooting. My documents, pictures, musics and other stuffs seems to be saved. It seems that I lost only just a cygwin directory.
Is it just a luck (I terminated command before it got
/cygdrive/c
) ? orcygwin's
rm
command has some kind of FOOL-proof architecture ?
If it is just a lucky then I must check twice...
4You're probably lucky. The rm will go through in file-system order, and /cygdrive happened to be farther "down" the chain and rm didn't reach it before you killed it. It also helps that cygwin is by its nature fairly slow on filesystem operations, because it has to remap unix file semantics into Windows-style stuff. – None – 2012-05-01T04:41:43.400
1I've used rm -rf on a directory in MingW before and nearly deleted my entire C drive. Cygwin may be different but don't bet on it. – Andrea – 2012-05-01T18:58:18.600