2
1
Is there an way to remove all the files from the current dir (recursively), keeping the directory structure?
2
1
Is there an way to remove all the files from the current dir (recursively), keeping the directory structure?
7
find . -type f -exec rm {} \;
Try without rm first to see what it will remove:
find . -type f
Beat me by about 2 seconds :) – FreudianSlip – 2013-03-11T12:02:21.847
1Alternatife for find:
--delete
(That way it does not need to start rm for each file, so you get less overhead). – Hennes – 2013-03-11T13:55:21.860