Delete files older than 30 days

Hi all,

     I want to delete log files with extension .log which are older than 30 

days. How to delete those files?

Operating system -- Sun solaris 10

Your input is highly appreciated.

Thanks in advance.

Regards,
Williams

cd /log/directory
find . -name '*.log'  -mtime +30 -exec rm -f {} \;

Make SURE this works for you - on dummy files - before you try it on real files.
You can change filetimes with the touch command

Thanks for your prompt response :slight_smile: