Is there an way to remove all the files from the current dir (recursively), keeping the directory structure?
1 Answer
find . -type f -exec rm {} \;
Try without rm first to see what it will remove:
find . -type f
-
-
1Alternatife for find:
--delete
(That way it does not need to start rm for each file, so you get less overhead).– HennesMar 11, 2013 at 13:55