shell remove dir keep files code example Example: linux delete files in folders without deleting the folder find /path/to/directory -type f -exec rm -iv {} \;