8.7.1 rm -rf .*
In "rm -rf .*", ".*" expands to
include "." and "..", and if you
happen to have privileges to write to the parent directory then you'll end up
removing all directories next to your current directory as
well.
-
"rm -rf ." : removes everything under current directory
and current directory itself.
-
"rm -rf *" : removes every non-dot files and non-dot
directories under current directory
-
"rm -rf .[^.]*" : removes every dot files and
dot-directories under current directory.
-
"rm -rf .*" : removes everything under parent directory
and parent directory itself.