8.7.1 rm -rf .*
The use of wild card file name in command line argument such as "rm
-rf .*" may cause dangerous result, since
".*" expands to include "." and
"..". Fortunately for the current verion of
"rm" command in the Debian distribution, it checks
sanity of the argument file names and refuses to remove
"." and "..". But this is not
always the case. Try following to see how the wild card file names work.
-
"echo ." : lists everything under current directory and
current directory itself.
-
"echo *" : lists every non-dot files and non-dot
directories under current directory
-
"echo .[^.]*" : lists every dot files and
dot-directories under current directory.
-
"echo .*" : lists everything under parent directory and
parent directory itself.