deleting files recursively, but not directories
I'm dealing with this kind of problem.
I have a tree of many directories and subdirectories, and I wanto to make a script that delete all files existing in this tree, but not directories, so I can have my tree empty.
The problem is that if I use " rm -rf * " , the command deletes also directories, because with " -r * " it deletes also directories if empty, not only files.
Does anybody have a tip?
Thanks in advance
"find" can delete only files in a directory tree,
(better check result or can delete something important!):
it was so simple...
Thanks a lot!
|All times are GMT -5. The time now is 03:50 PM.|