'BASH - Find files older dan MODIFICATION / CREATION date

I’m struggeling with the following: I have a samba share where people can put stuff into. I would like it to check for files and folders older than 30 days and delete these. Keep in mind that a file might been MADE back in 2001 but it needs to start counting from them moment I put in that folder. Other problem: what if the folder is > 30 days but someone put newer files in the folder? The folder shouldn’t then be deleted.

What I’ve found so far:

find /mnt/map/ -ctime -30

But I don’t know if this is correct and what I need?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source