Hi I'm new to scripting and I'm trying to delete a ton of files older than x days Now I have a script to do that
find /path/to/files* -mtime +10 -exec rm {} \;
But this will also delete the subdirectories. There are a ton of folders but I would like to keep them but delete the files older than 10days within the said folders.
Is there a way to do this?
Thanks!
