Archive WebSphere Portal SystemOut.log daily via cron job

  1. Create directory:  mkdir -p /opt/IBM/WebSphere/wp_profile/logs/WebSphere_Portal/SystemLog_archive/
  2.  Edit crontab:

$crontab -e

ADD:

 

0 1 * * * find /opt/IBM/WebSphere/wp_profile/logs/WebSphere_Portal/SystemOut_* -type f -mtime +1 -exec mv '{}' /opt/IBM/WebSphere/wp_profile/logs/WebSphere_Portal/SystemLog_archive/ \;

 

 

Viet Luu has written 146 articles

Leave a Reply