Hi Friends,
Very new in Unix and i got a requirement like writing a script and schedule it, so that it removes 30 days old files from all the log locations of a unix box.
Suppose i have a unix server ltbamdev1 and in this server i have a mount point opt/bam. In this mount point i have 3 different folders like
/ltbamdev1/oracle/install/product/10.1.3.1/OracleAS_1/opmn/logs
/ltbamdev1/oracle/install/product/10.1.3.1/OracleAS_1/bpel/domains/default/logs
/ltbamdev1/oracle/install/product/10.1.3.1/OracleAS_1/bpel/domains/support/logs
Please help me in writing a script which runs once a week and removes all 30 days old files from these three folder locations.
Thanks in advance
Duos
---------- Post updated at 01:32 AM ---------- Previous update was at 01:20 AM ----------
Currently i am doing in this way to remove file older than 30 days....
find ./ -name "*" -mtime +30 -exec rm {} \;
but i want a automated one. Need help on this.
Thanks
Duos