1 Reply Latest reply on Oct 19, 2012 7:46 AM by Fabian

    How to rotate the "global-application.log" file?

      Hi All~
      I want to rotate the log file, because it's file size gets more bigger.
      so I found the manual. (http://docs.oracle.com/cd/B31017_01/web.1013/b28950/logadmin.htm#JICON1000)
      but it seems that there is no way to rotate it.
      plz help me.


      Edited by: 930985 on 2012. 10. 18 오후 10:39

      Edited by: 930985 on 2012. 10. 18 오후 10:42
        • 1. Re: How to rotate the "global-application.log" file?
          You can try using Shell Script,

          Just edit the log_path and source_path in the below script,and save the script as log.sh
          The below script will take a backup of the global-application.log from $log_path and store it at $source_path
          Then will clear the global-application.log
          Below script you can set it on cron for daily basis or you can manually execute it when ever you want as ./log.sh

          cd $log_path
          date=`date +%d%m%y`
          cp global-application.log global-application.log_$date
          mv global-application.log_$date $source_path

          1 person found this helpful