rm -rf /some/path/*
deletes all non-hidden files in that dir (and subdirs).
rm -rf /some/path/.*
deletes all hidden files in that dir (but not subdirs) and also gives the following error/warning:
rm: cannot remove directory: `/some/dir/.'
rm: cannot remove directory: `/some/dir/..'
What is the proper way to remove all hidden and non-hidden files and folders recursively in a target directory without receiving the warning/error about .
and ..
?