I would like to delete every file, but keep the folder structure. Is there a way? NOTE: (I'm using GNU bash 4.1.5).
How to delete files only, but keep the directory structure?
bash;bash script
Try this:find . ! -type d -exec rm '{}' \;This will delete every single file, excluding directories, below the current working directory. Be extremely careful with this command.If the version of find on your machine supports it, you can also use find . ! -type d -delete