Eric Blake wrote:
On 09/07/2012 06:02 PM, Linda Walsh wrote:
The thing is, by doing rm -rf on ., I am not trying to remove . or ..
I'm trying to remove the files in it.
Other wise there is no way to specify, using "rm" to delete the contents
of a directory but not the directory itself.
Yes there is, and Paul already told it to you:
rm -rf * .[!.] .??*
----
You must have missed that rm doesn't expand shell globs... and I don't
want to get the shell involved for rm'ing files anymore than cp needs
to to copy directories or the files in a dir and not the dir.