As the question suggests, I have a situation where I have a folder that users can upload weird stuff there. Have a cron job set up to clean this folder every a few hours.
It has a .htaccess for security reasons, of course, my question is, how can I delete everything (files and directories) in that directory, including hidden ones whose name start with a dot, but not the .htaccess?
I currently have
rm -rf * to do the job but if the user uploads a file with a name starting with a dot, it would not be deleted.
Any help would be much appreciated. Thanks!